rux build
Purpose
Build the current package
Synopsis
rux build [options]
Behavior
Builds the normal package artifact and may additionally write inspection output selected by repeatable or comma-separated --emit. --debug and --release are mutually exclusive. Frontend target selection is supported, but linking a foreign target is rejected until that backend is available end to end.
Executable, SharedLibrary, and StaticLibrary packages build their conventional native artifact. A Windows SharedLibrary additionally writes its .lib import library. SourceLibrary packages can be checked but cannot be built directly.
--emit values
| Kind | Additional output |
|---|---|
tokens | Token streams in Temp/Tokens/ |
ast | Parsed syntax trees in Temp/Ast/ |
sema | Semantic-analysis dump in Temp/Sema/sema.txt |
hir | High-level IR in Temp/Hir/hir.txt |
lir | Low-level IR in Temp/Lir/lir.txt |
asm | Target assembly in Temp/Asm/ |
rcu | RCU objects in Temp/Obj/ and text dumps in Temp/Rcu/ |
The option is repeatable and accepts comma-separated values, so --emit ast --emit sema and --emit ast,sema are equivalent.
Arguments
This command accepts no operands.
Options
| Option | Description |
|---|---|
--all | Build all 16 target/profile cells; incompatible with --target, --debug, --release, and --emit |
--debug | Build with debug symbols (unoptimized output) |
--define <name[=value]> | Set or override a config compile-time value |
--emit <kind[,kind...]> | Additionally emit tokens, ast, sema, hir, lir, asm, or rcu inspection output |
--release | Build with release profile (optimized, no debug info) |
--stats | Print build timing, source, performance, and output statistics |
--target <triple> | Build for the specified target platform (e.g. linux-x86_64, linux-aarch64) |
-q, --quiet | Suppress non-essential output (only errors are shown) |
-v, --verbose | Enable verbose output for detailed build information |
Global options may appear before or after the command. See Global options.
Output and exit status
The artifact is written below configured [Build].Output using the selected profile. Inspection output is written below Temp/ and does not replace the normal artifact.
Success exits 0, invalid command-line usage exits 2, and compiler, validation, filesystem, network, or generation failures exit 1 unless stated otherwise above.
Examples
rux build
rux build --all --stats
rux build --debug
rux build --release --target linux-x86_64
rux build --stats
rux build --verbose --release
rux build --emit ast,sema
Environment variables
SOURCE_DATE_EPOCH fixes compiler timestamps for reproducible builds.
The global color environment behavior is described under Global options.