Skip to content
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

The wasm-rust.md example with interface types does not work. #1210

Closed
tiptop96 opened this issue Mar 3, 2020 · 3 comments
Closed

The wasm-rust.md example with interface types does not work. #1210

tiptop96 opened this issue Mar 3, 2020 · 3 comments

Comments

@tiptop96
Copy link
Contributor

tiptop96 commented Mar 3, 2020

https://github.com/bytecodealliance/wasmtime/blob/master/docs/wasm-rust.md#webassembly-interface-types

Problem number one is that it will not work with a higher version thanwasm-bindgen = "=0.2.55". Currently it is set to wasm-bindgen = "0.2.54" which will install a higher minor version than 55. This has been discussed, see: bytecodealliance/wasmtime-demos#13 (comment)

The second is that the wasmtime command requires the --enable-multi-value flag when using interface types (maybee this is just specific to the way the wasm-bindgen proc-macro works?). Or we get this.

$ wasmtime --invoke greet target/wasm32-wasi/release/wasm_greeting.wasm "Wooo!"
Error: failed to run main module `target/wasm32-wasi/release/wasm_greeting.wasm`

Caused by:
    invalid result arity: func type returns multiple values (at offset 43)

I have a PR ready to fix these, unless anyone has anything to add?

@tiptop96
Copy link
Contributor Author

tiptop96 commented Mar 3, 2020

@alexcrichton I can't assign you but I think you'd be the best person too look at this, being the author of the linked comment.

@alexcrichton
Copy link
Member

Thanks for the report!

Unfortunately at this time the demos of interface types are broken and we haven't gotten around to discussing how best to update documentation and update the state of the world. There's some discussion on Zulip though if you're curious to jump in!

@alexcrichton
Copy link
Member

I'm going to now that we've temporarily removed interface types support, but stay tuned to #677 for future updates!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants