WASI example (experimental)
On this page
This example runs a small data summary and Fibonacci calculation outside the browser. WASI support is experimental; see WASI deployment for setup.
Build and run
From this example's directory:
matchbox --target wasi service.bxs
wasmtime service.wasm
The program prints a dataset summary, Fibonacci terms and a completion message.
Containers
The included Dockerfile packages service.wasm in a scratch image. Running it requires a WASI-capable container runtime, not an ordinary Linux container runtime.
Use --target js for browser applications, or WASI HTTP for an HTTP component.