What problem does it solve?
Keeping the Golem Scala SDK's three embedded QuickJS guest runtime WASMs in sync with WIT world definitions, guest roles, and the pinned wasm-rquickjs toolchain is error-prone when done manually. This Skill documents the exact contract and regeneration pipeline so the artifacts stay consistent across sbt and Mill plugins.
Core Features & Use Cases
- WIT world contract reference: Explains the three Preview 3 worlds (agent-guest, tool-middleware-guest, agent-tool-middleware-guest) defined in
sdks/scala/wit/main.wit and their embedded WASM artifacts.
- Deterministic regeneration: Runs the checked-in
generate-agent-guest-wasm.sh script with the pinned wasm-rquickjs-cli 0.4.2 toolchain and wasm32-wasip2 target to rebuild all three WASMs into both plugin resource directories.
- Verification workflow: Validates the export contract and role matrix with the test scripts, checks tracked d.ts drift, and confirms sbt and Mill package identical bytes.
- Use Case: After editing
wit/main.wit or bumping synced WIT dependencies, run cargo make wit at the repository root and then regenerate and verify the guest runtime WASMs so CI's generated-file checks pass.
Quick Start
Regenerate the Golem Scala guest runtime WASMs by syncing WIT dependencies with cargo make wit and then running the generate-agent-guest-wasm.sh script from the sdks/scala directory.