Comprehensive guide to WebAssembly component development covering WASI fundamentals, component composition patterns, language interoperability, runtime compatibility, and troubleshooting.
This skill provides comprehensive expertise in developing WebAssembly components, including WASI fundamentals, composition patterns, runtime compatibility, and troubleshooting.
wash build when the project has .wash/config.yaml. Use wash build --skip-fetch for plugins (since wasmcloud:wash interface isn't published). Otherwise cargo build --target wasm32-wasip2 --release.wasm32-wasip2 (Rust 1.82+ tier-2 target). WASI 0.2 (wasip2) is the current standard.tokio 1.50+ with RUSTFLAGS="--cfg tokio_unstable", or wstd (lighter, Wasm-native). Do not mix.as_encoded_bytes().rayon, threaded tokio, std::thread::spawn./docs/v1/.Load the relevant file when working on the matching topic:
| Topic | File |
|-------|------|
| Component Model fundamentals, benefits, WASI (wasip2) basics | core-concepts.md |
| Composition patterns (simple dependency, adapter, middleware, facade), boundary design, building with wash build / cargo, wac, .wash/config.yaml | composition-and-building.md |
| Cross-language composition, supported languages (Rust, Python, JS/TS, Go, C/C++, C#), data type / performance / error handling considerations | language-interop.md |
| WASI gotchas (no threading, UTF-8 string assumptions, network capabilities), unknown-import errors, runtime-specific compatibility (wasmtime flags, wasmCloud), version alignment strategies | gotchas-and-runtime.md |
| Async with tokio on wasip2, wstd (Wasm-native async stdlib), when to choose which | async.md |
| Testing (host harness, mocks, wash integration, feature flags, env setup), debugging workflow, common error patterns, wasm-tools/wash inspect, performance (minimize cross-component calls, streaming, batching) | testing-debugging-performance.md |
| Documentation links, development/component-design/runtime-compat best practices, CI/CD examples, common architecture patterns (microservices, plugin, data pipeline) | patterns-and-best-practices.md |
wash build for wasmCloud projects — handles compatibility automaticallynpx skills add cosmonic-labs/webassembly-component-development下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer
Tags:webassembly, component-model, wasi, composition, troubleshooting