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

KindAdditional output
tokensToken streams in Temp/Tokens/
astParsed syntax trees in Temp/Ast/
semaSemantic-analysis dump in Temp/Sema/sema.txt
hirHigh-level IR in Temp/Hir/hir.txt
lirLow-level IR in Temp/Lir/lir.txt
asmTarget assembly in Temp/Asm/
rcuRCU 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

OptionDescription
--allBuild all 16 target/profile cells; incompatible with --target, --debug, --release, and --emit
--debugBuild 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
--releaseBuild with release profile (optimized, no debug info)
--statsPrint build timing, source, performance, and output statistics
--target <triple>Build for the specified target platform (e.g. linux-x86_64, linux-aarch64)
-q, --quietSuppress non-essential output (only errors are shown)
-v, --verboseEnable 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.