-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support non-fs inputs #141
Comments
Or maybe using a memfile to act as a bridge |
@kentosugama I think that is a feature we can add. The reason the crate doesn't support it currently is because the underlying binaryen APIs don't, so it will take some upstream work to make it possible in binaryen itself. I can get started on it this month. Just some notes to myself here: It looks to me like both the binaryen ModuleWriter and ModuleReader would need to get new functions, like
Then we can bind those as we do others. The surface API can add two methods to
I am not sure offhand how to deal with in-memory output sourcemaps in the binaryen api. |
Okay, that would be awesome. The API you sketched out looks exactly like what I need. |
I've filed an issue upstream to see how they feel about adding the APIs to binaryen. @kentosugama In your use case would you still be compiling the wasm-opt crate for a "normal" host environment, or do you need to run on a more exotic target like wasm32-unknown-unknown? I don't know to what extent binaryen supports targets that don't have typical OS. |
Hey Brian. Thanks for the update!
|
Hi!
This tool is very helpful. I had one gripe I was wondering about.
Is there any plans to allow modules to be programmatically passed to
wasm-opt
(even if it's unstructured binary being passed as an argument to the API) without first writing out to a file on the file system?wasm-opt-rs/components/wasm-opt/src/run.rs
Line 57 in 66b161e
The motivation for my request is that I may want to use this tool on a platform where I do not have fs access.
Thank you!
The text was updated successfully, but these errors were encountered: