Hi,
Is it possible to link two wasm modules together from the wasmtime CLI?
I've tried to preload a module but it didn't work:
wasmtime run --preload NAME=linking2.wasm linking1.wasm
output:
Error: failed to run main module linking1.wasm
Caused by:
0: failed to instantiate "linking1.wasm"
1: unknown import: linking2::double
has not been defined
The modules are taken from the linking tutorial:
https://docs.wasmtime.dev/examples-rust-linking.html
Thanks for your help
Hi David, that's not yet possible, unfortunately, but something at least in this direction will work in the future.
Right now the problem is that the wasmtime CLI doesn't really have enough information to go on: it can't know that the preloaded Wasm file is what's meant when referring to linking2
. While we in theory could just map file names to module names, we want to make sure that what we implement here will make sense in the long run, and that requires some amount of careful design
Hi Till,
thanks for your help :)
Last updated: Dec 23 2024 at 12:05 UTC