From all-skills
Guide for WebAssembly development with Wasmtime runtime. Covers compiling Rust/Zig to wasm, embedding Wasmtime in Rust or Elixir hosts, WASI versions, and the Component Model.
How this skill is triggered — by the user, by Claude, or both
Slash command
/all-skills:wasmtimeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Wasmtime is a standalone, fast, secure WebAssembly runtime from the Bytecode Alliance. It implements the WebAssembly standard and extensions including WASI (WebAssembly System Interface) and the Component Model.
Wasmtime is a standalone, fast, secure WebAssembly runtime from the Bytecode Alliance. It implements the WebAssembly standard and extensions including WASI (WebAssembly System Interface) and the Component Model.
Activate when:
| Concept | Purpose |
|---|---|
| Engine | Shared compilation environment and configuration |
| Store | Per-instance state container (fuel, epoch, host data) |
| Module | Compiled .wasm binary (core module) |
| Component | Compiled component with typed interfaces (WIT-based) |
| Instance | Runtime instantiation of a module or component |
| Linker | Resolves imports by name, defines host functions |
| WIT | WebAssembly Interface Type language for component contracts |
| Language | Target | Tooling | Reference |
|---|---|---|---|
| Rust | wasm32-wasip1, wasm32-wasip2, wasm32-unknown-unknown | cargo-component, wit-bindgen | guest-rust.md |
| Zig | wasm32-wasi, wasm32-freestanding | zig build, build.zig | guest-zig.md |
| Language | Crate/Package | Async Support | Reference |
|---|---|---|---|
| Rust | wasmtime crate | Yes (tokio) | host-rust.md |
| Elixir | wasmex hex package | Via GenServer | host-elixir.md |
| Version | Status | Key Differences |
|---|---|---|
| WASIp1 (Preview 1) | Stable, widely supported | POSIX-like, fd_* functions, linear memory I/O |
| WASIp2 (Preview 2) | Current standard | Component Model-based, typed streams, async-ready |
Use WASIp2 for new projects. WASIp1 remains supported for existing code. See overview.md for migration details.
| Reference | Contents |
|---|---|
| overview.md | Installation, core concepts detail, Component Model, WIT syntax, WASI deep dive, resource limits, AOT compilation, debugging |
| guest-rust.md | Rust wasm targets, cargo-component, wit-bindgen, binary size optimization, testing strategies |
| guest-zig.md | Zig wasm targets, build.zig configuration, allocator patterns, WASI imports, exports |
| host-rust.md | Wasmtime Rust API, WASI context setup, Component Model bindgen!, async support, plugin system patterns |
| host-elixir.md | Wasmex API, GenServer integration, memory access, host callbacks, supervision patterns |
whamm! instruments compiled .wasm modules by inserting probes through bytecode rewriting, using a DTrace-inspired .mm DSL for profiling, opcode counting, cache simulation, and call graph analysis. Run instrumented modules on wasmtime by preloading the whamm core library: wasmtime run --env TO_CONSOLE=true --preload whamm_core=whamm_core.wasm out.wasm. For CLI installation (mise github backend), the .mm language, and instrumentation strategies, see the whamm and whamm-dsl skills in the whamm plugin (/plugin install whamm@vinnie357).
wasm32-wasip2 for Component Model, wasm32-wasip1 for legacy WASI, wasm32-unknown-unknown for bare modulesStore owns instance state — do not share stores across threads without synchronizationOutOfFuel trapsnpx claudepluginhub vinnie357/claude-skills --plugin whammGuides Wasmtime for WebAssembly development: compiling Rust/Zig to wasm, embedding in Rust/Elixir hosts, using WASI, and Component Model.
Automatically discovers and provides access to WebAssembly skills for development tasks with WASM, WASI, wasm-bindgen, Rust-to-WASM, wasm-pack, and browser runtimes.
Defines typed contracts between WebAssembly components using the WIT Interface Definition Language. Use when writing .wit files, designing worlds and interfaces, or working with the Component Model type system.