supplement necessary instructions to run example-wasi (#4633)

This commit is contained in:
jiang1997
2022-08-08 23:37:16 +08:00
committed by GitHub
parent c5e3c0cafb
commit e6d339b6ac
2 changed files with 6 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ Example of instantiating a WebAssembly which uses WASI imports.
You can compile and run this example on Linux with: You can compile and run this example on Linux with:
cmake example/
cargo build --release -p wasmtime-c-api cargo build --release -p wasmtime-c-api
cc examples/wasi/main.c \ cc examples/wasi/main.c \
-I crates/c-api/include \ -I crates/c-api/include \

View File

@@ -1,7 +1,11 @@
//! Example of instantiating of instantiating a wasm module which uses WASI //! Example of instantiating of instantiating a wasm module which uses WASI
//! imports. //! imports.
// You can execute this example with `cargo run --example wasi` /*
You can execute this example with:
cmake example/
cargo run --example wasi
*/
use anyhow::Result; use anyhow::Result;
use wasmtime::*; use wasmtime::*;