From de2eccaec78c5030e93112d0ebbc76f747a26dc1 Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Thu, 13 Aug 2026 20:44:30 +0100 Subject: [PATCH 1/3] 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 5ddbadb..9cd9e58 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -23,3 +23,10 @@ updates: - "cargo" schedule: interval: "daily" + - package-ecosystem: rust-toolchain + directory: / + labels: + - dependencies + - rust-toolchain + schedule: + interval: weekly diff --git a/AGENTS.md b/AGENTS.md index 02fc2c8..6bd9c3f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -372,3 +372,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 79b14e0..c9852de 100644 --- a/Makefile +++ b/Makefile @@ -73,3 +73,14 @@ nixie: ## Validate Mermaid diagrams 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 3abd70adf2f65d011fed778058a0621c4ec303cf Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Thu, 13 Aug 2026 23:38:38 +0100 Subject: [PATCH 2/3] 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 1be867e041dc722d8982464a0ec96e1f6277cd5d Mon Sep 17 00:00:00 2001 From: Payton McIntosh Date: Fri, 14 Aug 2026 00:20:32 +0100 Subject: [PATCH 3/3] Substitute CARGO into the dev-fast Make targets Estate review flagged that the appended dev-build and dev-test recipes hard-code `cargo` although the Makefile exposes an injectable `CARGO` variable, hiding the process dependency at the command boundary. Route both recipes through `$(CARGO)`, mirroring the companion branch byte-for-byte so the two open pull requests merge cleanly in either order. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c9852de..27b1aad 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ 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 + $(CARGO) --config "$(DEV_FAST_CONFIG)" build dev-test: ## Run tests with Cranelift and mold - cargo --config "$(DEV_FAST_CONFIG)" test + $(CARGO) --config "$(DEV_FAST_CONFIG)" test