-
Notifications
You must be signed in to change notification settings - Fork 84
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
WASI Library support in wasmer-js 1.0 #284
Comments
Hi @h1romas4, what APIs would be useful for your use case? Just being able to access the instance and it's exports? |
@syrusakbary Thank you for your responce. Yes, I would like to have access to the instance and exports. In my use case, main(_start) is not the only entry point, there are many export functions generated by wasm-bindgen and extern "C". Within the exported function, there are calls to the WASI API such as println!(Rust) and fopen(C++), and I want to call these functions from JavaScript in my Web Browser. The specific exports looks like this. (/libymfm_bg.js was generated by wasm-bindgen)
The actual source code for wasmer-python and wasmer-js examples can be found under the https://github.com/h1romas4/libymfm.wasm Thank you! |
Return the raw instance when instantiating. Fix #284
This issue should be now solved. |
Basically, calling |
Thank you for your quick response! |
Hello.
In wasmer-js 0.12.0, I was able to use the WASI module as a library (and get an export) in the following process, is there any plan to support it in the 1.0 series?
https://github.com/h1romas4/libymfm.wasm/blob/v0.9.0/examples/web/src/js/wasi_wasmer.js#L41-L73
Best regards.
The text was updated successfully, but these errors were encountered: