-
Notifications
You must be signed in to change notification settings - Fork 812
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
State of the art of the interface types #2480
Comments
Hello, There is a lot of confusion in your message, and I'm glad to address them :-). There is indeed a WebAssembly Interface Types Proposal, which is —at the time of writing— at Phase 1, i.e. very unstable, not ready to be implemented, experimental. We have done our own implementation of this proposal in the past (see the Nor wasmtime, nor any Wasm runtimes, support Interface Types for the moment because it's changing constantly.
|
Thank's ! |
If I understand correctly, that means that the languages runtimes for wasi (for example the python module) can only communicate builtins values like i32 and f32 to the exported functions ? |
You can access memories of WASM VMs from the host environment but not vice versa (at least not implictly). WASM Modules have exactly one memory, which can also be shared across modules. You can pass around pointers in this memory at which you define your custom data types (e.g. string) and share those i32 integer pointers with other modules | (exported) functions etc. You can also pass a custom function as an import to do stuff in the host env, called from the module. I've had a discussion about this topic with @Hywan in this issue and written some examples in my repository . There you can find examples for python using wasmer and wasmtime, go using wasmer and javascript/node using V8. For the time being, we're stuck with this hackish solution of manipulating memory. I don't know of any tools to bridge the time, but it will become obsolete anyway when interface-types are integrated. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I installed wasmtime to experiment with wasi recently, and I heard about the "interface types proposal" from bytecodealliance.
So I used the wasm-bindgen crate that already implement this interface from rust to wasi.
And following this tutorial, I installed the wasmtime python library, but I discovered that support for interface types have been removed ! (bytecodealliance/wasmtime#1292)
My question is: what is the current situation for wasmer around this issue ?
Is the wasi interface type proposal stable enough ?
And what are the other ways to make languages communicate via wasm ? I know about files, I/O and sockets, but can you share the ram for example ? I didn't see any example of that with wasmer and wasmtime.
The text was updated successfully, but these errors were encountered: