Golem is a distributed computing platform built in Rust. It uses cargo-make for build orchestration.
- Rust: Latest stable toolchain via rustup, with
wasm32-wasip2target - cargo-make: Latest version (
cargo install --force cargo-make) - cargo-test-r: Latest version (
cargo install -f --locked --git https://github.com/vigoo/test-r --branch cargo-test-r cargo-test-r) - redis: Required for tests
- docker: Required for integration tests
cargo make build # Full debug build
cargo make build-release # Full release build
cargo build -p <crate> # Build specific crateAlways run cargo make build before starting work to ensure all dependencies are compiled.
Note: The SDKs in sdks/ are not part of the main build flow. Load sdk-development when working on the Rust or TypeScript SDKs, golem-scala-development when working on the Scala SDK, and see sdks/moonbit/AGENTS.md when working on the MoonBit SDK.
Tests use test-r. Important: Each test file must import test_r::test or tests will not run.
Worker executor tests, integration tests, and CLI integration tests may depend on built test components from test-components/. These .wasm artifacts are not checked into the repository anymore, so build the specific components needed by the selected tests before running them. Use the modifying-test-components skill for targeted rebuilds, or rebuild-all-test-components when a full rebuild is needed.
Do not run cargo make test — it runs all tests and takes a very long time. Instead, choose the appropriate test command:
| Change Type | Test Command |
|---|---|
| Core logic, utilities | cargo make unit-tests |
| Worker executor functionality | cargo make worker-executor-tests |
| Service integration | cargo make integration-tests |
| CLI changes | cargo make cli-integration-tests |
For specific tests: cargo test -p <crate> -- <test_name> --report-time
For CLI integration test reruns or isolation, use cargo make cli-integration-tests-group1 through cargo make cli-integration-tests-group6.
Whenever tests are modified, always run the affected tests to verify they still pass before considering the task complete.
Load the testing skill for detailed guidance on test filtering, debugging failures, test components, and timeouts.
cargo build -p golem # Build the golem binary
./target/debug/golem # Run locallyLoad these skills for guided workflows on complex tasks:
| Skill | When to Use |
|---|---|
modifying-http-endpoints |
Adding or modifying REST API endpoints (covers OpenAPI regeneration, golem-client rebuild, type mappings) |
adding-dependencies |
Adding or updating crate dependencies (covers workspace dependency management, versioning, features) |
testing |
Running and debugging tests (covers test filtering, debugging failures, test components, timeouts) |
debugging-hanging-tests |
Diagnosing worker executor or integration tests that hang indefinitely |
modifying-test-components |
Building or modifying test WASM components, or rebuilding after SDK changes |
modifying-wit-interfaces |
Adding or modifying WIT interfaces and synchronizing across sub-projects |
modifying-service-configs |
Changing service configuration structs, defaults, or adding new config fields |
sdk-development |
Working on the Rust, TypeScript, or MoonBit SDKs in sdks/ |
golem-scala-development |
Compile, publish, and test the Golem Scala SDK in sdks/scala/ |
golem-scala-integration-tests |
Running and debugging Scala SDK integration tests |
golem-scala-base-image |
WIT folder structure and regenerating agent_guest.wasm for the Scala SDK |
golem-scala-code-generation |
Writing Scala code generators for the Scala SDK |
investigating-executor-performance |
Investigating worker-executor performance with OTLP tracing and Jaeger |
golem-skill-harness |
Developing, testing, and running Golem skill tests with the skill test harness |
pre-pr-checklist |
Final checks before submitting a pull request |
Always run before creating a pull request:
cargo make fixThis runs rustfmt and clippy with automatic fixes. Load pre-pr-checklist skill for the full workflow.
- Follow existing code conventions in the file you're editing
- Do not add unnecessary comments
- Use existing libraries and utilities from the codebase
- Security: Never expose or log secrets/keys
All crate dependencies must have their versions specified in the root workspace Cargo.toml under [workspace.dependencies]. Workspace members must reference them using x = { workspace = true } in their own Cargo.toml rather than specifying versions directly.
golem-worker-executor/- Worker execution enginegolem-worker-service/- Worker management servicegolem-component-compilation-service/- Component compilergolem-shard-manager/- Distributed shard managementgolem-registry-service/- Component registrygolem-common/- Shared types and utilitiesgolem-wasm/- WASM utilitiesgolem-rib/- Rib language implementationcli/- CLI tools (golem-cli, golem)sdks/- Language-specific SDKs (Rust, TypeScript, Scala, MoonBit) - not part of main build flow, see SDK-specific AGENTS.mdgolem-skills/- Skill definitions and skill testing harnessintegration-tests/- Integration test suitetest-components/- Test WASM components