This repository contains an example of a WebAssembly interface, implemented in Rust as a WebAssembly component, then consumed from other Rust and C++ components.
It is a showcase of the
wit-bindgen
tooling from
the Bytecode Alliance.
# building the implementation
$ cd rust-wasi-impl && make build
# building, linking, and running the C++ example
$ cd cpp-consumer && make bindgen build link run
# building, linking, and running the Rust example
$ cd rust-consumer && make build link run
- Wasmtime at v0.33
wit-bindgen
at 2e654dc82b- WASI SDK at
v12+ in
/opt/wasi-sdk/
(configurable inMakefile
) - Rust at
1.56+ with the
wasm32-wasi
target configured