Development, test, lint, and typecheck builds use the parallel rustc frontend
(-Zthreads=8) and, on Linux, the mold linker (-Clink-arg=-fuse-ld=mold).
These are defaults in .cargo/config.toml, which Cargo discovers on its own,
so a bare cargo build gets them. mold ships for Linux only, so the linker
flag lives in a Linux-only table and macOS and Windows keep their platform
linker. Cargo selects one rustflags source rather than merging them, so every
source repeats the same flags apart from the linker.
An assigned RUSTFLAGS replaces the configuration's flags, so the Makefile
recipes that set it compose the standard's flags onto any inherited value (CI's
setup-rust exports one). One build is deliberately excluded: the coverage
step in CI assigns RUSTFLAGS without the fast flags because a measurement
should not depend on them. The repository has no release recipe or workflow.
Cargo has no per-profile rustflags, so a direct cargo build --release takes
the configuration's flags unless RUSTFLAGS is assigned (even an empty value
displaces the configuration).
On Linux, install mold before building: the configuration names it, so a
build without it fails at link time. CI installs it through setup-rust's
install-mold input. tests/build_standard_contract.rs holds the standard. It
reads the configuration sources, the commands make -n prints for each
development target on a Linux host and a macOS host (each keeping the caller's
own RUSTFLAGS), the coverage steps of the CI workflows (each assigns its own
RUSTFLAGS) and their setup-rust steps (each must pass install-mold), so a
flag lost through a recipe or workflow edit fails there. The decision is
recorded in ADR 004. The contract runs
make -n, so a direct cargo test needs GNU make on the PATH. It fails when
make is missing instead of skipping, so a missing tool cannot read as a pass.
Cranelift
Exception: Cranelift is not the development-profile backend. The full suite was
measured under it on the pinned nightly-2025-09-14 on 2026-09-29. The whole
suite fails there while passing under LLVM, because the test build fails to
link. mold reports undefined aws_lc_0_45_0_* symbols referenced from
aws-lc-rs (the rustls dependency), which the LLVM backend links without
complaint. Re-measure the whole suite on the next toolchain bump, and adopt the
backend when it passes.