What problem does it solve?
Adding third-party crates to a Golem Rust project is risky because the compilation target is wasm32-wasip2, and many crates using threads, native system calls, or std::net will fail to compile. This Skill guides the correct way to add a dependency and verify it builds.
Core Features & Use Cases
- Dependency Addition: Adds crates to the component's Cargo.toml, with support for Cargo workspace dependency management.
- WASM Compatibility Guidance: Explains which crate categories work on wasm32-wasip2 and how to recover from build failures using wasm/wasi feature flags or alternative crates.
- Build Verification: Runs golem build to confirm the new dependency compiles for the WebAssembly target.
- Use Case: You want JSON schema validation in your Golem agent. Add the crate to Cargo.toml, run golem build, and if it fails, follow the guidance to find a WASM-compatible alternative.
Quick Start
Add the serde_yaml crate to my Golem Rust component and verify it builds.