Closed
Description
Hey team!
I wanted to use a .wasm module that has been compiled from Rust, using the wasm32_wasip1_threads
target but it looks like this target required some imports from the host that are not being satisfied when I try to instantiate a module like:
engine = Engine()
wasi_config = WasiConfig()
wasi_config.inherit_stdout()
store = Store(engine)
store.set_wasi(wasi_config)
with open( 'my_wasi_library.wasm', 'rb') as f:
wasi_bytes = f.read()
module = Module(engine, wasi_bytes)
linker = Linker(engine)
linker.define_wasi()
instance = linker.instantiate(store, module) # This throws: wasmtime._error.WasmtimeError: unknown import: `env::memory` has not been defined
I would have expected the define_wasi()
to prepare everything so the required imports are satisfied, but I guess this wasm32_wasip1_threads
target might not be supported just yet?
Thank you very much!!
Awesome work, btw :)
Metadata
Metadata
Assignees
Labels
No labels