Repository navigation
rules: no debug info in a default build profile - #18
Merged
Merged
Conversation
DWARF, not code, is what makes Rust build output large, and no test reads it. The shared compiler cache on this machine holds 320 GiB of dev-profile artifacts out of a 335 GiB store — 6.7x its configured limit — with a single strided_kernel dev rlib at 1.13 GiB. The rules already asked for `debug = 0` on dev and test but recommended `debug = "line-tables-only"` for release backtraces, and did not say that `debug = 1` and `line-tables-only` are debug info rather than a size compromise. `build-artifacts.md` gains the section, with the measurement, the workspace-root caveat (Cargo ignores a dependency's own `[profile.*]`), and the cache-key note. The two profile bullets in `performance.md` now point at it, and `index.md` routes the file for setting profile options that change artifact size.
This was referenced Oct 11, 2026
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.
Why
DWARF, not code, is what makes Rust build output large, and no test reads it. Measured on one machine: the shared compiler cache holds 320 GiB of
dev-profile artifacts out of a 335 GiB store — 6.7x its configured limit — with a singlestrided_kerneldev rlib at 1.13 GiB. Every workspace without[profile.dev] debug = 0was contributing.The rules already asked for
debug = 0on dev and test, but recommendeddebug = "line-tables-only"for release backtraces and did not say thatdebug = 1andline-tables-onlyare debug info rather than a size compromise.What
rules/rust/build-artifacts.md: new Debug Info Is Not A Default section. Every default profile keepsdebug = 0;debug = 1and"line-tables-only"emit DWARF and count as a finding; the measurement; the workspace-root caveat (Cargo ignores a dependency's own[profile.*], so a vendoreddebug = 1is neither the cause nor a thing to patch); and that-Cdebuginfois part of the cache key, so turning it off invalidates rather than corrupts.rules/rust/performance.md: the two profile bullets now say the same thing and point at that section, instead of recommending line tables on a default release profile.rules/rust/index.md: routesbuild-artifacts.mdfor "setting Cargo profile options that change artifact size".The six workspace PRs this rule would have caught are open: tensor4all/hdf5-rt#25, SpM-lab/sparse-ir-rs#337, tuwien-cms/xprec-rs#50, tensor4all/tenferro-benchmark#130, tensor4all/tensor4all-benchmark#9, shinaoka/koushi-matrix#1350.