Hi Community,
I am trying to follow the steps in https://bytecodealliance.org/articles/wasi-threads, and I have encountered the error:
../wasmtime/target/debug/wasmtime run --wasm=threads --wasi-modules=experimental-wasi-threads thread-test.wasm
error: unexpected argument '--wasi-modules' found
tip: a similar argument exists: '--wasi'
Usage: wasmtime run <--optimize <KEY[=VAL[,..]]>|--codegen <KEY[=VAL[,..]]>|--debug <KEY[=VAL[,..]]>|--wasm <KEY[=VAL[,..]]>|--wasi <KEY[=VAL[,..]]>> <WASM>...
For more information, try '--help'.
Then I tried another commend, but still get error:
../wasmtime/target/debug/wasmtime run --wasm=threads thread-test.wasm
Error: failed to run main module `thread-test.wasm`
Caused by:
0: failed to instantiate "thread-test.wasm"
1: unknown import: `env::memory` has not been defined
Any help will be appreciated!
You need wasmtime run --wasi threads=y --wasi preview2=n
.
The wasmtime cli has changed since the wasi-threads announcement was made.
bjorn3 said:
The wasmtime cli has changed since the wasi-threads announcement was made.
Thanks so much!
Last updated: Nov 22 2024 at 16:03 UTC