From d311761f9ee4b072d0b49bf87a238e3c223d17ec Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Thu, 22 Oct 2026 21:18:54 +0100 Subject: [PATCH 1/2] Disable incremental compilation and dev debug data Set incremental = false and debug = 0 in the default dev profile, per the concordat rust-dev-build-footprint rule. The pinned toolchain is stable, so no unstable Cargo key is needed. This reduces intermediate build artefact storage. --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 4fc85d10..f32c0ebe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -109,3 +109,7 @@ bare_urls = "deny" invalid_html_tags = "deny" invalid_codeblock_attributes = "deny" unescaped_backticks = "deny" + +[profile.dev] +incremental = false +debug = 0 From fbae90116adbdeabd7b1d77190029d8ac9a687b3 Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Fri, 23 Oct 2026 02:43:45 +0100 Subject: [PATCH 2/2] Document the development profile footprint settings --- docs/developers-guide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/developers-guide.md b/docs/developers-guide.md index 2cfb3888..0cf4c524 100644 --- a/docs/developers-guide.md +++ b/docs/developers-guide.md @@ -2116,6 +2116,17 @@ 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. +The default development profile in `Cargo.toml` sets `incremental = false` and +`debug = 0`, per the Concordat `rust-dev-build-footprint` rule. Development +builds therefore keep no incremental compilation state and no debug +information, which cuts the intermediate artefacts a build writes to disk. The +cost is that a debugger sees no symbols or line tables in a default development +build, and every rebuild recompiles whole crates. To debug, build with a +profile that sets `debug` explicitly, or override on the command line, for +example `CARGO_PROFILE_DEV_DEBUG=true cargo build`; set `CARGO_INCREMENTAL=1` +to re-enable incremental rebuilds locally. The pinned `1.99.1` is stable, so +the rule's unstable metadata key does not apply. + 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). Two builds are deliberately excluded: coverage