| name | rebuild-all-test-components |
| description | Rebuilds all test WASM components from scratch. Use when explicitly asked to rebuild all test components, or when there are merge conflicts in any test-components/*.wasm files. |
Rebuild All Test Components
Clean rebuild of every test WASM component in test-components/. This is a heavyweight operation — use it when all components need regeneration, or when worker executor / integration / CLI integration tests need many test-component artifacts and targeted rebuilds would be slower.
Quick Path (single command)
cargo make build-test-components
This handles everything: builds golem-cli, the TS SDK, then cleans and rebuilds all test components.
Manual Steps (if needed)
1. Build golem-cli
The build scripts rely on golem-cli from the local build:
cargo make build
2. Clean and rebuild the TypeScript SDK (including agent template)
The TS test components depend on the TS SDK and its embedded agent template WASM:
cd sdks/ts
npx pnpm run clean
npx pnpm install
npx pnpm run build
npx pnpm run build-agent-template
Requires cargo-component v0.21.1 — install with:
cargo install cargo-component --version 0.21.1
3. Clean all test components
cd test-components
./build-components.sh clean
4. Build all test components
cd test-components
./build-components.sh
If any component fails to build, fix the issue and re-run ./build-components.sh. The script will rebuild all components. Repeat until all components build successfully.
Rebuilding Only a Subset
./build-components.sh accepts optional arguments to limit the work to a language group or a single chunk. Prefer these over a full rebuild when only some components changed.
Build a single language group
cd test-components
./build-components.sh rust # Rust test apps only
./build-components.sh ts # TypeScript test apps only
./build-components.sh benchmarks # Benchmark apps only
The rust group does not require Node/the TS SDK. The ts and benchmarks groups need the TS SDK and agent template built first (step 2 above).
Build a single chunk of a group
The script splits Rust and TS apps into chunks for parallel CI builds. To build just one chunk:
cd test-components
./build-components.sh rust-1 # Nth chunk of the rust group (1..RUST_CHUNKS)
./build-components.sh ts-1 # Nth chunk of the ts group (1..TS_CHUNKS)
Chunk counts are defined by RUST_CHUNKS / TS_CHUNKS near the top of build-components.sh. Use ./build-components.sh list-groups to print the available group names as JSON (used for CI matrix generation).
Other modifiers
These can be combined with a group/chunk argument (e.g. ./build-components.sh clean rust):
./build-components.sh clean # Clean only, do not build
./build-components.sh rebuild # Clean, then build
./build-components.sh check # Run only `golem-cli build --step check` (no artifacts produced)
check cannot be combined with clean or rebuild.
For rebuilding one specific component (not a whole group), use the modifying-test-components skill instead.
5. Verify
After rebuilding, the .wasm files in test-components/ should be present. Note: these files are gitignored and must be built before tests that use them.
Troubleshooting
- Missing
wasm-rquickjs-cli: Check the required version in .github/workflows/ci.yaml (WASM_RQUICKJS_VERSION) and install it: cargo install wasm-rquickjs-cli --version <VERSION>
- TS build failures: Ensure
npx pnpm run build-agent-template completed successfully before building TS test components
- Rust build failures: The script sets
GOLEM_RUST_PATH automatically to sdks/rust/golem-rust; ensure the Rust SDK builds cleanly with cargo build -p golem-rust