Repository navigation
Conversation
Set incremental = false, debug = 0 and embed-metadata = false for the footprint rule, and -Zthreads=8 in every rustflags source with mold in the Linux source for the build standard. Restate both flags where RUSTFLAGS is assigned (the gate recipes, the build job's setup-rust, the Dependabot test step and the mutation workflow), install mold in CI, and record why Cranelift is not the development backend. A contract test holds the configuration, the recipes and the CI provisioning.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true |
Reviewer's GuideThis PR adopts the Rust build standard and development-build footprint by centralizing Cargo defaults, composing equivalent flags through Makefile and CI paths where RUSTFLAGS overrides Cargo configuration, provisioning mold on Linux runners, documenting the Cranelift exception and operational trade-offs, and enforcing the behavior with workflow contract tests. Sequence diagram for Makefile Rust gate flag compositionsequenceDiagram
participant Developer
participant Makefile
participant Cargo
participant Rustc
Developer->>Makefile: make test-rust
Makefile->>Makefile: STANDARD_TARGET_GUARD
Makefile->>Makefile: GATE_RUST_FLAGS_ENV
Makefile->>Cargo: RUSTFLAGS=-D warnings plus inherited flags and STANDARD_RUSTFLAGS
Cargo->>Rustc: cargo nextest run
Rustc->>Rustc: -Zthreads=8
alt Linux host
Rustc->>Rustc: -Clink-arg=-fuse-ld=mold
end
Flowchart for Cargo Rust build defaultsflowchart TD
Start["Cargo build"] --> Profile["dev profile: incremental=false, debug=0"]
Profile --> Metadata["embed-metadata=false"]
Metadata --> Frontend["-Zthreads=8"]
Frontend --> Platform{"target_os = linux?"}
Platform -->|Yes| Mold["Use mold linker"]
Platform -->|No| Native["Use platform linker"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
mold names the linker, not the English word the en-GB dictionary prefers. Ignore only the flag and the install-mold input so prose stays checked.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of DF12-110
Brings wildside to both Rust build rules in one PR, because they edit the same configuration files: the dev-build footprint (concordat
rust-dev-build-footprint, DF-001 to DF-003) and the build standard (rust-build-defaults, BD-001 to BD-009).Changes
.cargo/config.toml:[profile.dev]getsincremental = falseanddebug = 0;[unstable] embed-metadata = false(the native key for dated nightlies from 2026-07-31, which the pin is on);-Zthreads=8in[build]and the Linux target table,-Clink-arg=-fuse-ld=moldin the Linux table only (Cargo selects onerustflagssource, so each repeats the frontend flag).Makefile:GATE_RUST_FLAGS_ENVcomposes-D warnings, any inheritedRUSTFLAGSand the standard flags intolint-architectureandtest-rust; it refusesCARGO_BUILD_TARGET, because the linker flag is chosen from the host.RUST_FLAGS_ENV(-D warningsonly) stays on the Whitaker recipes, which build their lint driver on another toolchain and must not inherit the flags.buildjob'ssetup-ruststep installs mold and exportsRUSTFLAGSas-D warnings -Zthreads=8 -Clink-arg=-fuse-ld=mold, and the DependabotRust testsstep restates it. The mutation workflow installs mold and itssetup-commandsrestores the same value for cargo-mutants, becausesetup-rustexports-D warningsalone there. The coverage jobs are unchanged and keep-D warningsalone, so a measurement stays on the platform linker.make test-rustonnightly-2026-10-28with Cranelift selected for the dev and test profiles was stopped at 1,218 of 1,849 tests with 52SIGABRTs (Cranelift-compiled panics find no unwind handler; for exampledomain::ports::cache_key::tests::coordinate_bound_is_inclusive) anddomain::user::tests::new_panics_when_invalid_idfailing; the suite passes on LLVM. The pin has since moved tonightly-2026-10-31; the guide says so and sets a re-measurement by 2026-11-30.tests/workflow_contracts/build_standard_test.pyholds the footprint settings, the configuration sources, the Makefile composition (Linux and non-Linux, viamake -n), the target refusal, the Whitaker boundary, the build job's inputs and the mutation workflow.mutation_testing_test.pyfollows the new inputs.Evidence
rust-dev-build-footprintnoncompliant (DF-001, DF-002, DF-003) andrust-build-defaultsnoncompliant (BD-001, BD-002, BD-004, BD-008, BD-009). After, on this tree:concordat artefact rule runreports bothcompliant.make check-fmt,make lint(onnightly-2026-10-31),make test,make markdownlintandmake nixie;make lint-makefile,make lint-actions,make lint-python,make check-fmt-python,make typecheck-pythonandmake test-workflow-contractsalso pass. Results are appended below once the run completes.buildonubicloud-standard-4, under its 120-minute ceiling).Open PRs touching the same files: Dependabot PRs #535 and #526.
Summary by Sourcery
Adopt the repository-wide Rust build standard and development footprint across Cargo, Makefile gates, and CI.
Enhancements:
CI:
Documentation:
Tests:
Chores: