This is a simple demo of how to embed a Wasmtime cwasm
file (e.g. a
WebAssembly component compiled to native code) in a Rust program and execute it.
- Rust
- Be sure to add the
wasm32-wasi
target usingrustup target add wasm32-wasi
- Be sure to add the
cargo run --release
You should see "Hello, world!" printed.