Repository navigation
build: dev-fast profile + opt-in sccache/mold (card 424deb5e slices 1-3) - #1520
Merged
joelteply merged 1 commit intoJun 4, 2026
Merged
Conversation
…lices 1-3) Three config-only build-time wins bundled because each is tiny and shares the same surface (workspace Cargo.toml + new src/workers/.cargo/config.toml). ## Slice 3 — [profile.dev-fast] New profile inheriting `dev`. Settings: - opt-level = 0 (fastest compile) - debug = "line-tables-only" (panics still readable; ~30-50% smaller object files; meaningfully faster link) - incremental = true (explicit for discoverability) - codegen-units = 256 (parallel rustc) Use case: hot-iter integration tests + airc work claim iteration — "just make it run" not "measure perf" or "chase a panic". --dev stays for ergonomic debug; --release stays for production. Invoke: `cargo build --profile dev-fast` or `cargo test --profile dev-fast`. ## Slice 1 — opt-in sccache `src/workers/.cargo/config.toml` created with sccache rustc-wrapper COMMENTED + install instructions inline. Per [[organization-purity-as-we-migrate]] + [[no-fallbacks-ever]] the config doesn't ship a wrapper line that breaks builds for devs who haven't installed sccache — opt-in by uncommenting. Biggest win for the airc work claim flow: each worktree has its own target/ but sccache backs them with one shared on-disk cache. Hit rates of 80-95% on common changes; cold target/ feels warm. ## Slice 2 — opt-in mold/lld linker Same `.cargo/config.toml`. Per-target linker override blocks COMMENTED with install instructions: - macOS arm64 / x86_64 → lld via brew install llvm - Linux x86_64 / arm64 → mold via apt install mold Default link step burns 30-60s per build on this codebase (vendored llama.cpp + candle + tokio + all substrate crates). mold/lld cuts that to 2-5s. Devs opt in by uncommenting their platform's block + installing the linker. ## Doctrine - [[init-once-handle-then-lease-zero-copy-refs]] — sccache is the rustc-level lease-per-input cache (compile-time analogue of the runtime pattern). - [[organization-purity-as-we-migrate]] — opt-in pattern so we don't ship "silently broken better defaults". - [[no-fallbacks-ever]] — config either works or is inert; no partial-degradation path. ## Test plan - `cargo check --profile dev-fast -p continuum-orm-derive` succeeds (verified locally: 6.89s clean) - `cargo check -p continuum-orm-derive` (default `dev`) unchanged (verified locally: 5.97s clean) - `.cargo/config.toml` has zero active settings — all entries commented (verified: grep returns empty) - No regression on existing Docker image build (config-only changes don't affect cargo-chef stages) Card 424deb5e (the parent build-time doctrine card) sequences the larger remaining slices: pre-built llama.cpp .a artifacts (biggest architectural lever), GGUF-baked Docker image variant, GitHub Release attachments, CI regression gate, upstart benchmark. Co-Authored-By: Claude Opus 4.7 <[email protected]>
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.
Summary
Three config-only build-time wins from build-time doctrine card
424deb5e. Bundled as one PR because each is tiny and they share the same surface (workspaceCargo.toml+ newsrc/workers/.cargo/config.toml).[profile.dev-fast]— new third lane betweendev(ergonomic debug) andrelease(production perf).opt-level=0,debug="line-tables-only",codegen-units=256,incremental=true. For airc-work-claim iteration and hot-loop testing where you just want the binary to RUN.src/workers/.cargo/config.tomlwith commented sccacherustc-wrapperline + install instructions. Default behavior unchanged; devs opt in by installing sccache and uncommenting.Why opt-in for sccache/mold
Per
[[no-fallbacks-ever]]: if we shiprustc-wrapper = "sccache"and the dev hasn't installed sccache, the build breaks with "command not found." Cleaner to require explicit opt-in than to ship "silently broken better defaults." Documented inline so devs see install instructions when they're already looking at the file.Test plan
cargo check --profile dev-fast -p continuum-orm-derivesucceeds (verified locally: 6.89s clean)cargo check -p continuum-orm-derivedefault behavior unchanged (verified locally: 5.97s clean).cargo/config.tomlhas zero active settings (verified:grep -v '^#\|^$'returns empty)cargo-chefstagesParent card
424deb5e— Build + boot time substrate doctrine. Sequences the remaining larger slices:Doctrine
[[init-once-handle-then-lease-zero-copy-refs]]— sccache is the rustc-level lease-per-input cache (compile-time analogue of the runtime pattern)[[organization-purity-as-we-migrate]]— opt-in pattern so we don't ship silently-broken better defaults[[no-fallbacks-ever]]— config either works or is inert; no partial-degradation pathTargets
canaryper merge discipline.🤖 Generated with Claude Code