chore: set dev profile debug to 1#426
Conversation
Reduces target/ disk usage while keeping backtrace file:line info. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryAdds Confidence Score: 5/5Safe to merge — purely a build-profile tweak with no runtime behaviour change. Single-line Cargo config change that is well-understood in the Rust ecosystem. No code logic, no dependencies, no security surface. The trade-off (less debugger variable info vs. smaller target/) is accurately described in the PR and is the standard practice for teams optimising CI/worktree disk usage. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[cargo build / cargo run] --> B{Profile?}
B -- dev --> C[debug = 1\nLine tables only]
B -- release --> D[debug = 0\nNo debug info]
C --> E[✅ Backtraces: file:line preserved]
C --> F[⬇️ No variable/type DWARF info]
C --> G[⬇️ Smaller target/ directory]
D --> H[Optimised binary]
Reviews (1): Last reviewed commit: "chore: set dev profile debug to 1" | Re-trigger Greptile |
There was a problem hiding this comment.
Code Review
This pull request updates the Cargo.toml file to set the development profile's debug level to 1, which helps reduce the size of build artifacts. The reviewer suggests a refinement to maintain full debug information for the local crate while keeping the optimization for dependencies to ensure a better debugging experience.
| [profile.dev] | ||
| debug = 1 |
There was a problem hiding this comment.
Setting debug = 1 (or "line-tables-only") globally is an effective way to reduce target/ size by omitting detailed variable and type information for dependencies. However, this also applies to your local crate, which can make debugging your own code significantly harder as you won't be able to inspect variables in a debugger. Consider keeping full debug info for the roast crate while applying the optimization to all dependencies. Since dependencies typically make up the vast majority of the build artifacts, this approach retains most of the disk space savings while preserving a good development experience.
| [profile.dev] | |
| debug = 1 | |
| [profile.dev] | |
| debug = 1 | |
| [profile.dev.package.roast] | |
| debug = 2 |
Summary
Reduces
target/disk usage by setting[profile.dev] debug = 1, while keeping backtrace file:line info intact.The default
debug = 2writes full DWARF — including variable/type info that's only needed when stepping through code in a debugger (lldb/gdb). Withdebug = 1, panics,RUST_BACKTRACE=1, and error chains still resolve to file:line; only debugger variable inspection is reduced.In practice this typically shrinks
target/by a meaningful percentage, which adds up across worktrees.Test plan
cargo buildstill succeedsThis PR was generated by an AI coding assistant.
Note
Low Risk
Build-profile-only change that reduces debug symbol generation in
dev; no runtime logic changes, but could slightly impact debugging/stacktrace detail expectations in local builds.Overview
Sets Cargo's
devprofile todebug = 1inCargo.toml, reducing the amount of debug info emitted for local development builds (and typically shrinkingtarget/size) without affecting release builds or application code.Reviewed by Cursor Bugbot for commit 5ac0e39. Bugbot is set up for automated code reviews on this repo. Configure here.