wasi
- First, download the appropriate tarball below
- Extract it, it'll make a directory called
wasi
- Execute
rustup toolchain link wasi $PWD/wasi
- Execute
rustc +wasi -vV
and make sure it works - Clone https://github.com/cranestation/wasmception-wasi
- Run
make
inside there
- This'll take quite awhile as it builds clang
- Create
hello.rs
which is the standard rust hello world rustc +wasi hello.rs --target wasm32-unknown-wasi -C linker=/path/to/wasmception-wasi/dist/bin/clang
- Clone https://github.com/cranestation/wasmtime-wasi
cargo run --bin wasmtime /path/to/hello.wasm