The build block selects the archetype and target platform.
The build block tells the compiler which archetype to target and sets archetype-specific
options. It is optional; if omitted, the compiler defaults to the standalone archetype with
host-platform settings.
build {
archetype = "standalone"
}| Field | Type | Required | runtime() | Default | Description |
|---|---|---|---|---|---|
archetype | standalone | no | no | "standalone" | Artifact shape and build toolchain selected for the agent. |
When archetype = "standalone" (the default), the following additional fields control
cross-compilation targeting:
| Field | Type | Required | runtime() | Default | Description |
|---|---|---|---|---|---|
os | linux | mac_os | windows | no | no | host platform | Target operating system. |
arch | x86_64 | aarch64 | no | no | host platform | Target CPU architecture. |
os and arch must always be specified together. When both are omitted, the binary is compiled
for the host platform. Specifying only one of them is an error.
The os and arch combination maps to a Rust target triple:
os | arch | Target triple |
|---|---|---|
linux | x86_64 | x86_64-unknown-linux-gnu |
linux | aarch64 | aarch64-unknown-linux-gnu |
mac_os | x86_64 | x86_64-apple-darwin |
mac_os | aarch64 | aarch64-apple-darwin |
windows | x86_64 | x86_64-pc-windows-msvc |
windows | aarch64 | aarch64-pc-windows-msvc |
build {
archetype = "standalone"
os = "linux"
arch = "aarch64"
}See the Standalone reference for artifact requirements and interfaces, or Archetypes for the concept behind the selection.
© 2026 pogue.dev. All rights reserved.
CC BY 4.0