Skip to content

feat(profile): Add built-in profile debug #17214

Open
epage wants to merge 3 commits into
rust-lang:masterfrom
epage:debug-profile
Open

feat(profile): Add built-in profile debug #17214
epage wants to merge 3 commits into
rust-lang:masterfrom
epage:debug-profile

Conversation

@epage

@epage epage commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

Key points:

  • It inherits from dev
    • Conceptually, debugging is part of the development process
    • The hope is this will smooth out the transition for people
  • cargo install --debug now uses debug instead of dev
  • debug changes nothing from dev right now.
    dev will evolve in the future
    (with debug overriding those values to leave it effectively unchanged)
    but that is deferred out to offer a transition period where debug
    can be used without but isn't required for debugging as people deal
    with multiple Rust versions. This also shrinks the change and
    decouples what the conversation around what the settings should be.
  • dev still uses target/debug: this does not change any calculation for the transition cost and any conflicts between the profiles should mostly be in the artifact-dir (which are just hard links), especially once the new build layout lands
  • --dev/--debug flags are deferred out, needing more evaluation to decide if they are worth it

See also https://github.com/rust-lang/cargo-team/blob/main/meetings/sync-meeting/2026-07-14.md#splitting-dev-and-debug-profiles

How to test and review this PR?

This is part of #15931

epage added 3 commits July 14, 2026 14:20
Key points:
- It inherits from `dev`
  - Conceptually, debugging is part of the development process
  - The hope is this will smooth out the transition for people
- `cargo install --debug` now uses `debug` instead of `dev`
- `debug` changes nothing from `dev` right now.
  `dev` will evolve in the future
  (with `debug` overriding those values to leave it effectively unchanged)
  but that is deferred out to offer a transition period where `debug`
  can be used without but isn't required for debugging as people deal
  with multiple Rust versions. This also shrinks the change and
  decouples what the conversation around what the settings should be.
@rustbot rustbot added the A-cli Area: Command-line interface, option parsing, etc. label Jul 14, 2026
@epage
epage marked this pull request as draft July 14, 2026 20:18
@rustbot rustbot added the A-cli-help Area: built-in command-line help label Jul 14, 2026
@rustbot

rustbot commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, weihanglo

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues A-profiles Area: profiles S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 14, 2026
@epage epage mentioned this pull request Jul 14, 2026
@epage
epage marked this pull request as ready for review July 15, 2026 00:10
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 15, 2026
@rustbot

rustbot commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@weihanglo

Copy link
Copy Markdown
Member

@epage

epage commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Added the link and what looked like I might have been missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation A-manifest Area: Cargo.toml issues A-profiles Area: profiles S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants