Skip to content

chore(build): build debug info as line tables - #566

Open
LKSNDRTMLKV wants to merge 1 commit into
mainfrom
chore/dev-line-tables-only
Open

LKSNDRTMLKV wants to merge 1 commit into
mainfrom
chore/dev-line-tables-only

Conversation

@LKSNDRTMLKV

Copy link
Copy Markdown
Member

Summary

Debug and test builds now keep only line tables as debug info: [profile.dev] debug = "line-tables-only".

Backtraces and panic messages keep their function names, files and line numbers. What goes is the variable-level DWARF, which is most of a debug target/ and most of the memory a test-binary link needs. The cost is inspecting variables in a step debugger. test inherits from dev, so the test binaries are covered too.

Only this workspace's own builds read the profile. A crate that depends on these crates from crates.io builds them under its own profile, so nothing published changes.

Related issue

None. Found while tracing disk and memory pressure on a 15 GiB development machine.

Changes

  • Root Cargo.toml: a [profile.dev] section, with a comment saying what it keeps and what it costs.

Measured

Each run: just check from an empty target/ in the same worktree, under the same CPU and memory cap. The first row is unchanged main (58c6e1e), the second is this branch.

target/ target/debug/deps gate wall time
full debug info (main) 7,071 MB 5,106 MB 266 s
line-tables-only 3,739 MB (−47%) 2,370 MB (−54%) 231 s

The wall time is indicative only: other builds were running on the machine. Both gates were green. This branch's gate ran 2,121 tests, all passing.

Checklist

  • No behaviour changed, so no new tests
  • just check passes locally
  • No secrets, credentials or .env files in the diff
  • No public API change
  • no-changelog label, and a reason below

No changelog: a development build-profile change; no published crate or document changes.

@LKSNDRTMLKV LKSNDRTMLKV added the no-changelog Needs no CHANGELOG entry; the body says why on a 'No changelog:' line label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Needs no CHANGELOG entry; the body says why on a 'No changelog:' line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant