원클릭으로
golem-build
Building a Golem application. Use when asked to build a Golem project, compile components to WASM, or troubleshoot build errors.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Building a Golem application. Use when asked to build a Golem project, compile components to WASM, or troubleshoot build errors.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Invoking a Rust Golem agent method from the CLI. Use when asked to call, invoke, or run a method on a deployed agent using golem agent invoke.
Defining environment variables for Golem agents. Use when configuring env vars in golem.yaml at the component template, component, agent type, or preset level, passing env vars to individual agent instances via CLI, or using template substitution and merge modes.
Exposing a Rust Golem agent over HTTP. Use when the user asks to add HTTP endpoints, mount an agent to a URL path, or expose agent methods as a REST API.
Adding secrets to Rust Golem agents. Use when the user needs to store sensitive configuration such as API keys, passwords, or tokens that should not be checked into source control.
Calling Golem agents from external Rust applications using generated bridge SDKs. Use when the user wants to invoke agents from outside the Golem platform, from a Rust CLI, server, or any native Rust application.
Setting up a Golem Cloud account from scratch. Use when creating a Golem Cloud account, authenticating with Golem Cloud via the CLI, setting up a cloud profile, or deploying to Golem Cloud for the first time.
| name | golem-build |
| description | Building a Golem application. Use when asked to build a Golem project, compile components to WASM, or troubleshoot build errors. |
golem buildBoth golem and golem-cli can be used — all commands below work with either binary.
golem build --yes
Run this from the application root directory (where the root golem.yaml is located). It builds all components defined in the project. Always pass --yes to avoid interactive prompts.
golem build DoesThe build is a multi-step pipeline:
cargo for Rust, npm/node for TypeScript).golem.yaml for each component. These commands are language-specific:
cargo build --target wasm32-wasip2 (or with --release for the release preset).tsc for type checking, golem-typegen for metadata extraction, rollup for bundling, then injects the bundle into a prebuilt QuickJS WASM and optionally preinitializes it.golem build tracks file hashes of sources and targets. If nothing changed since the last build, steps are skipped automatically. Use --force-build to bypass this.
The final WASM artifact is placed in golem-temp/agents/ under the application root:
golem-temp/agents/<component_name_snake_case>_debug.wasmgolem-temp/agents/<component_name_snake_case>_release.wasmgolem-temp/agents/<component_name_snake_case>.wasmgolem-temp/agents/<component_name_snake_case>.wasmThe component name in snake_case is derived from the component name in golem.yaml. For example, a component named my-app:rust-main produces my_app_rust_main_debug.wasm.
| Option | Description |
|---|---|
[COMPONENT_NAME]... | Build only specific components (by default, all components are built) |
-s, --step <STEP> | Run specific build step(s): check, build, add-metadata, gen-bridge |
--skip-check | Skip build-time requirement checks |
--force-build | Skip up-to-date checks, rebuild everything |
-P, --preset <PRESET> | Select a component preset (e.g., release) |
-Y, --yes | Non-interactive mode — always use this flag |
golem.yamlBuild commands are defined per component template and preset in golem.yaml:
componentTemplates:
rust:
presets:
debug:
default: true
build:
- command: cargo build --target wasm32-wasip2
componentWasm: "target/wasm32-wasip2/debug/<name>.wasm"
outputWasm: "golem-temp/agents/<name>_debug.wasm"
The build section is a list of steps. Each step can be:
command: — a shell command to executeinjectToPrebuiltQuickjs: — injects a JS bundle into a QuickJS WASM (TypeScript/Scala only)preinitializeJs: — preinitializes the JS runtime in the WASM (TypeScript/Scala only)Each step can specify sources and targets for incremental builds, dir for the working directory, and env for environment variables.
golem clean
This removes golem-temp/ and any other directories listed in the clean section of each preset.
wasm32-wasip2 target (Rust): run rustup target add wasm32-wasip2golem build automatically runs npm install if package.json is present but node_modules is missing.ts source files; the tsc step runs with --noEmit false --emitDeclarationOnly