Closed cgranade closed 4 years ago
This is likely to the use of the multi-value. You can enable support for multi-value in wabt by passing the --enable-multi-value
flag.
Thanks for the report! In addition to needing to explicitly enable multi-value it looks like you also might be using wasm-bindgen and interface-types, but unfortunately those features aren't working with the current wasmtime implementation. There's some more information on this here, but otherwise for now I'd recommend not using wasm-bindgen with wasmtime while we sort out the implementation
Thanks for the help, @sunfishcode and @alexcrichton! I had followed the demos at https://github.com/bytecodealliance/wasmtime-demos/blob/master/markdown/src/lib.rs without realizing the current incompatibility between wasm-bindgen and wasmtime, so I really appreciate the pointer. As someone new to working with wasm, may I ask if there's a recommended alternative to wasm-bindgen for use with wasmtime? Thanks!
Currently you'll need to manually set up how to transfer strings across the boundary with linear memory, there's no alternative like wasm-bindgen that's automatic right now (or at least not that I know of)
When using the
dot
method from thendarray
crate, a library compiled with cargo-wasi fails to import into wasmtime for .NET with the exception:Testing the generated wasm file with the wasm-validate tool from https://github.com/WebAssembly/wabt results in the following output:
Using
wasm-objdump
to investigate the header at000034
gives the following output:When commenting out the call to the
dot
method, the Type section changes to: