Workspace of Rust crates that compile to Switchboard WASM plugins. Each plugin is an independent cdylib exporting the Switchboard guest ABI.
| Target | Command |
|---|---|
| Build all | cargo build --release --target wasm32-wasip1 |
| Build one | cargo build --release --target wasm32-wasip1 -p <plugin>-wasm |
| Format | cargo fmt |
| Clippy | cargo clippy --target wasm32-wasip1 -- -D warnings |
- Scaffold
plugins/<name>/withCargo.toml(crate-type = ["cdylib"]) andsrc/lib.rs. - Depend on
switchboard-guest-sdkvia git:{ git = "https://github.com/daltoniam/switchboard.git" }. - Export the 6 required ABI functions (
name,metadata,tools,configure,execute,healthy) — the SDK provides helpers for all of them. - Build, copy output to
dist/<name>.wasm, and add an entry tomanifest.jsonwithsha256,size,released_at, and a download URL pointing atdist/<name>.wasmonmain.
- Crate name:
<plugin>-wasmso the artifact is<plugin>_wasm.wasm. - Tool naming:
<plugin>_<verb>_<noun>(matches core Switchboard convention). - No panics in tool handlers — return structured errors via the SDK.
- Configuration is stored in a static
Mutexpopulated byconfigure. - Optimize for size:
opt-level = "z",lto = true,strip = true,panic = "abort"(set in the workspace rootCargo.toml).
See Switchboard plugin marketplace docs for the authoritative schema. Each plugin has one or more versions entries; bump the version on every binary change.