From b213fa6e3bf2a3d7def627e3b158738562a1e03c Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Thu, 13 Aug 2026 20:43:57 +0100 Subject: [PATCH 1/5] Align Dependabot coverage and add the dev-fast fragment Bring `.github/dependabot.yml` to the estate baseline: one update stanza per package ecosystem the repository uses, each labelled `dependencies` plus its channel label, with GitHub Actions updates batched into a single pull request via a wildcard group. Add the opt-in dev-fast build fragment at `tools/dev-fast/config.toml` (Cranelift codegen for the dev profile and the mold linker on Linux) with `dev-build` and `dev-test` Make targets that pass it explicitly via `--config`, and signpost the workflow in `AGENTS.md`. Release, coverage, and verification builds are unaffected: the fragment is never auto-discovered. --- .github/dependabot.yml | 7 +++++++ AGENTS.md | 9 +++++++++ Makefile | 11 +++++++++++ tools/dev-fast/config.toml | 30 ++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 tools/dev-fast/config.toml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9b3a19c..e57b900 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -28,3 +28,10 @@ updates: cooldown: default-days: 7 semver-major-days: 14 + - package-ecosystem: rust-toolchain + directory: / + labels: + - dependencies + - rust-toolchain + schedule: + interval: weekly diff --git a/AGENTS.md b/AGENTS.md index 9b9d31d..34291de 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -380,3 +380,12 @@ The following tooling is available in this environment: These practices help maintain a high-quality codebase and facilitate collaboration. + +## Fast development builds + +`make dev-build` and `make dev-test` compile with the opt-in Cranelift +backend and the mold linker configured in `tools/dev-fast/config.toml`. +They require a nightly toolchain and, on Linux, a `mold` binary on the +`PATH`. The fragment is passed explicitly with `--config`, so release, +coverage, and verification builds are unaffected; never copy its contents +into `.cargo/config.toml`, which Cargo applies to every build. diff --git a/Makefile b/Makefile index 8ef66e4..a57b7d1 100644 --- a/Makefile +++ b/Makefile @@ -105,3 +105,14 @@ rust-audit: ## Audit the Rust workspace for known vulnerabilities help: ## Show available targets @grep -E '^[a-zA-Z_-]+:.*?##' $(MAKEFILE_LIST) | \ awk 'BEGIN {FS=":"; printf "Available targets:\n"} {printf " %-20s %s\n", $$1, $$2}' + +# Opt-in accelerated debug builds (Cranelift + mold); requires a nightly +# toolchain. See AGENTS.md and tools/dev-fast/config.toml. +DEV_FAST_CONFIG ?= tools/dev-fast/config.toml + +.PHONY: dev-build dev-test +dev-build: ## Build debug binaries with Cranelift and mold + cargo --config "$(DEV_FAST_CONFIG)" build + +dev-test: ## Run tests with Cranelift and mold + cargo --config "$(DEV_FAST_CONFIG)" test diff --git a/tools/dev-fast/config.toml b/tools/dev-fast/config.toml new file mode 100644 index 0000000..75bfd76 --- /dev/null +++ b/tools/dev-fast/config.toml @@ -0,0 +1,30 @@ +# Canonical opt-in Cargo configuration fragment for accelerated local debug +# builds. +# +# This file is deliberately kept out of `.cargo/config.toml`. Cargo +# auto-discovers that path, so anything placed there applies to release +# packaging, coverage, and verification builds, which must keep the +# supported LLVM backend and platform linker. Copy this fragment to +# `tools/dev-fast/config.toml` and pass it explicitly with +# `cargo --config tools/dev-fast/config.toml ...` from `make dev-build` and +# `make dev-test`. +# +# Repositories that set repository-wide `rustflags` in `.cargo/config.toml` +# must restate them in the target table below: Cargo picks a single +# rustflags source rather than merging them, and a `[target.*]` table +# outranks the `[build]` table. + +[unstable] +codegen-backend = true + +# Cranelift trades runtime performance for compile speed, so it applies to +# the dev profile only. The `make dev-*` targets never build release +# artefacts. +[profile.dev] +codegen-backend = "cranelift" + +# mold ships for Linux only, so the flag is gated behind a target `cfg`. On +# macOS and Windows the table simply does not apply and the platform default +# linker is used. +[target.'cfg(target_os = "linux")'] +rustflags = ["-Clink-arg=-fuse-ld=mold"] From 04318a91bf6835cf4b9b161dbb708f3068d3d161 Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Thu, 13 Aug 2026 22:17:23 +0100 Subject: [PATCH 2/5] Accept mold as the linker's name in the spelling config The dev-fast rollout writes "mold" (the linker) into AGENTS.md and the Makefile, and the en-GB-oxendict spelling gate reads it as a misspelling of "mould", failing CI. Accept the word via the estate's correction-to-itself pattern in `typos.local.toml`, and mirror it in the generated dictionary so local runs agree with the regenerated configuration. --- typos.local.toml | 3 +++ typos.toml | 1 + 2 files changed, 4 insertions(+) diff --git a/typos.local.toml b/typos.local.toml index 5f6506b..eb80a50 100644 --- a/typos.local.toml +++ b/typos.local.toml @@ -9,6 +9,9 @@ stems = [] accepted = [] [words.corrections] +# "mold" names the linker (https://github.com/rui314/mold); it is not a +# misspelling of "mould" in that context. +mold = "mold" [patterns] ignore = [ diff --git a/typos.toml b/typos.toml index 9c0720b..20befa2 100644 --- a/typos.toml +++ b/typos.toml @@ -1488,6 +1488,7 @@ extend-ignore-re = [ "modularizers" = "modularizers" "modularizes" = "modularizes" "modularizing" = "modularizing" +"mold" = "mold" "monetisable" = "monetizable" "monetisably" = "monetizably" "monetisation" = "monetization" From 125764e51b033ce8c829079b70ab5222f5e3b2c8 Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Thu, 13 Aug 2026 23:35:07 +0100 Subject: [PATCH 3/5] Scope the mold spelling exception to linker contexts A blanket `mold = "mold"` correction disables detection of genuine "mould" misspellings everywhere in the repository. Replace it with pattern-scoped exemptions covering only the linker contexts the dev-fast rollout introduced (`-fuse-ld=mold`, "mold linker", "Cranelift + mold", "Cranelift and mold", and backticked `mold`), and mirror them in the generated dictionary. Text such as "the bread had mold growing on it" is flagged again. --- typos.local.toml | 10 +++++++--- typos.toml | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/typos.local.toml b/typos.local.toml index eb80a50..66df251 100644 --- a/typos.local.toml +++ b/typos.local.toml @@ -9,12 +9,16 @@ stems = [] accepted = [] [words.corrections] -# "mold" names the linker (https://github.com/rui314/mold); it is not a -# misspelling of "mould" in that context. -mold = "mold" [patterns] ignore = [ + # "mold" names the linker (https://github.com/rui314/mold) in these + # contexts only; the mould correction stays active elsewhere. + "-fuse-ld=mold", + "mold linker", + "Cranelift \\+ mold", + "Cranelift and mold", + "`mold`", # Official documentation name. 'Azure Architecture\s+Center\s+\|\s+Microsoft Learn', # Public design identifiers are exact API names. diff --git a/typos.toml b/typos.toml index 20befa2..7c72056 100644 --- a/typos.toml +++ b/typos.toml @@ -30,6 +30,11 @@ extend-exclude = [ [default] locale = "en-gb" extend-ignore-re = [ + "-fuse-ld=mold", + "mold linker", + "Cranelift \\+ mold", + "Cranelift and mold", + "`mold`", "(?m)^ if current_runtime\\.runtime_flavor\\(\\) == RuntimeFlavor::MultiThread \\{$", "(?m)^ CARGO_TERM_COLOR: always$", "(?m)^ #\\[tokio::test\\(flavor = \"current_thread\"\\)\\]$", @@ -1488,7 +1493,6 @@ extend-ignore-re = [ "modularizers" = "modularizers" "modularizes" = "modularizes" "modularizing" = "modularizing" -"mold" = "mold" "monetisable" = "monetizable" "monetisably" = "monetizably" "monetisation" = "monetization" From dc890083ec041cce46ebd3e04502cbde16045cf5 Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Thu, 13 Aug 2026 23:38:48 +0100 Subject: [PATCH 4/5] Refresh the dev-fast fragment's comments from canon Estate review flagged two defects in the fragment's deployed comments: a stale "copy this fragment" instruction that reads as nonsense once the file is in place, and a mis-statement of Cargo's rustflags semantics (Cargo joins the entries of every matching `[target.*]` table; only the joined result takes precedence over `[build].rustflags` rather than merging). Both are corrected in the canonical source; take its bytes verbatim. No configuration key changes. --- tools/dev-fast/config.toml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tools/dev-fast/config.toml b/tools/dev-fast/config.toml index 75bfd76..01e7f89 100644 --- a/tools/dev-fast/config.toml +++ b/tools/dev-fast/config.toml @@ -1,18 +1,19 @@ # Canonical opt-in Cargo configuration fragment for accelerated local debug # builds. # -# This file is deliberately kept out of `.cargo/config.toml`. Cargo -# auto-discovers that path, so anything placed there applies to release -# packaging, coverage, and verification builds, which must keep the -# supported LLVM backend and platform linker. Copy this fragment to -# `tools/dev-fast/config.toml` and pass it explicitly with -# `cargo --config tools/dev-fast/config.toml ...` from `make dev-build` and -# `make dev-test`. +# This configuration is deliberately kept out of `.cargo/config.toml`. +# Cargo auto-discovers that path, so anything placed there applies to +# release packaging, coverage, and verification builds, which must keep +# the supported LLVM backend and platform linker. In a consuming +# repository this fragment lives at `tools/dev-fast/config.toml` and is +# passed explicitly with `cargo --config tools/dev-fast/config.toml ...` +# from `make dev-build` and `make dev-test`. # # Repositories that set repository-wide `rustflags` in `.cargo/config.toml` -# must restate them in the target table below: Cargo picks a single -# rustflags source rather than merging them, and a `[target.*]` table -# outranks the `[build]` table. +# must restate them in the target table below. Cargo joins the rustflags of +# every matching `[target.*]` entry (target-triple and `cfg` tables alike), +# but the joined target rustflags take precedence over `[build].rustflags` +# rather than merging with it. [unstable] codegen-backend = true From e966576c0f2d84419e0f3edc274b951ced707903 Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Fri, 14 Aug 2026 01:05:38 +0100 Subject: [PATCH 5/5] Regenerate typos.toml to clear spelling-config drift The recent spelling-configuration commits edited the committed `typos.toml` by hand; the pinned typos-config-builder orders entries canonically, so the drift check rejects the hand-inserted ordering. Regenerate the file with the repository's own pinned builder. The diff is ordering only: no pattern is added or removed, and the scoped mold exemptions behave identically. --- typos.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/typos.toml b/typos.toml index 7c72056..ffc8346 100644 --- a/typos.toml +++ b/typos.toml @@ -30,11 +30,6 @@ extend-exclude = [ [default] locale = "en-gb" extend-ignore-re = [ - "-fuse-ld=mold", - "mold linker", - "Cranelift \\+ mold", - "Cranelift and mold", - "`mold`", "(?m)^ if current_runtime\\.runtime_flavor\\(\\) == RuntimeFlavor::MultiThread \\{$", "(?m)^ CARGO_TERM_COLOR: always$", "(?m)^ #\\[tokio::test\\(flavor = \"current_thread\"\\)\\]$", @@ -43,9 +38,14 @@ extend-ignore-re = [ "(?m)^### HookArtifact and HookSubscription$", "(?m)^use tokio::runtime::RuntimeFlavor;$", "(?s)```.*?```", + "-fuse-ld=mold", "Azure Architecture\\s+Center\\s+\\|\\s+Microsoft Learn", + "Cranelift \\+ mold", + "Cranelift and mold", "\\brust-analyzer\\b", "`[^`\\n]+`", + "`mold`", + "mold linker", ] [default.extend-words]