WebAssembly
[wasmtime][wasmtime] is an embeddable WebAssembly runtime. These recipes
cover the host embedding API — loading modules, calling exports, sharing
linear memory, and wiring up host-defined functions that guests can call back
into.
The recipes live outside the main workspace because wasmtime is a large
dependency not used elsewhere. Run them with
cargo run --manifest-path crates/wasm/Cargo.toml --bin <name>.
Embedding wasmtime
| Recipe | Crates | Categories |
|---|---|---|
| Call an exported WebAssembly function | [![wasmtime-badge]][wasmtime] | [![cat-wasm-badge]][cat-wasm] |
| Exchange data via WebAssembly linear memory | [![wasmtime-badge]][wasmtime] | [![cat-wasm-badge]][cat-wasm] |
| Define host functions for WebAssembly | [![wasmtime-badge]][wasmtime] | [![cat-wasm-badge]][cat-wasm] |
| Component Model — typed strings and structs | [![wasmtime-badge]][wasmtime] [![wasmtime-wasi-badge]][wasmtime-wasi] [![wit-bindgen-badge]][wit-bindgen] | [![cat-wasm-badge]][cat-wasm] |
{{#include links.md}}