Repository navigation
feat(config): Add build.profile, install.profile - #17215
Merged
Merged
Conversation
Collaborator
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
epage
marked this pull request as draft
July 14, 2026 20:23
epage
force-pushed
the
config-profile
branch
4 times, most recently
from
July 16, 2026 14:08
1127b1e to
2add9e9
Compare
This comment has been minimized.
This comment has been minimized.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 7, 2026
### 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 - `build.profile` will be a follow up (#17215) - `dev` profile changes are deferred for 1+ releases
This comment has been minimized.
This comment has been minimized.
epage
marked this pull request as ready for review
August 10, 2026 17:06
This comment has been minimized.
This comment has been minimized.
epage
force-pushed
the
config-profile
branch
from
September 24, 2026 00:33
96a2f39 to
0d49d00
Compare
This comment has been minimized.
This comment has been minimized.
Collaborator
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
epage
force-pushed
the
config-profile
branch
from
September 25, 2026 18:14
0d49d00 to
573612d
Compare
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
approved these changes
Sep 25, 2026
rustbot
enabled auto-merge
September 25, 2026 18:40
epage
added a commit
to epage/cargo
that referenced
this pull request
Sep 26, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. Fixes rust-lang#15931
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Sep 30, 2026
Update cargo submodule 8 commits in 3d7cf6e937d6127d0f49881bf689c560b36d35c4..f3865b2a4d1acc5276f6b3c67d0e057f4dab3928 2026-09-25 01:47:29 +0000 to 2026-09-29 19:58:08 +0000 - fix(config): Proper dotted tuple support with legacy fallback (rust-lang/cargo#17536) - refactor: Rename internal content from target-triple to target-tuple (rust-lang/cargo#17535) - docs(changelog): remove duplicate items (rust-lang/cargo#17528) - chore: bump to 0.102.0; update changelog (rust-lang/cargo#17525) - feat(metadata): mirror package features in features_v2 (rust-lang/cargo#17517) - feat(config): Add build.profile, install.profile (rust-lang/cargo#17215) - feat(builtin-deps): Add `SourceKind::Builtin` (rust-lang/cargo#17513) - fix(compilation): Preventing OUT_DIR env var from leaking into cargo run after build.rs run (rust-lang/cargo#17503) r? ghost
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Sep 30, 2026
Update cargo submodule 8 commits in 3d7cf6e937d6127d0f49881bf689c560b36d35c4..f3865b2a4d1acc5276f6b3c67d0e057f4dab3928 2026-09-25 01:47:29 +0000 to 2026-09-29 19:58:08 +0000 - fix(config): Proper dotted tuple support with legacy fallback (rust-lang/cargo#17536) - refactor: Rename internal content from target-triple to target-tuple (rust-lang/cargo#17535) - docs(changelog): remove duplicate items (rust-lang/cargo#17528) - chore: bump to 0.102.0; update changelog (rust-lang/cargo#17525) - feat(metadata): mirror package features in features_v2 (rust-lang/cargo#17517) - feat(config): Add build.profile, install.profile (rust-lang/cargo#17215) - feat(builtin-deps): Add `SourceKind::Builtin` (rust-lang/cargo#17513) - fix(compilation): Preventing OUT_DIR env var from leaking into cargo run after build.rs run (rust-lang/cargo#17503) r? ghost
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this pull request
Oct 1, 2026
Update cargo submodule 8 commits in 3d7cf6e937d6127d0f49881bf689c560b36d35c4..f3865b2a4d1acc5276f6b3c67d0e057f4dab3928 2026-09-25 01:47:29 +0000 to 2026-09-29 19:58:08 +0000 - fix(config): Proper dotted tuple support with legacy fallback (rust-lang/cargo#17536) - refactor: Rename internal content from target-triple to target-tuple (rust-lang/cargo#17535) - docs(changelog): remove duplicate items (rust-lang/cargo#17528) - chore: bump to 0.102.0; update changelog (rust-lang/cargo#17525) - feat(metadata): mirror package features in features_v2 (rust-lang/cargo#17517) - feat(config): Add build.profile, install.profile (rust-lang/cargo#17215) - feat(builtin-deps): Add `SourceKind::Builtin` (rust-lang/cargo#17513) - fix(compilation): Preventing OUT_DIR env var from leaking into cargo run after build.rs run (rust-lang/cargo#17503) r? ghost
epage
added a commit
to epage/cargo
that referenced
this pull request
Oct 20, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. Fixes rust-lang#15931
epage
added a commit
to epage/cargo
that referenced
this pull request
Oct 20, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. For cargo `cargo test --no-run` build+target dir: - master: 3.6G - this PR: 2.9G For bevy `cargo test --no-run` build+target dir: - master: 369G - this PR: 348G Surprised at how much space was taken up: - `build/`: 189G -> 174G - `examples/`: 175G -> 168G (across 364 examples) - `incremental/`: 14G -> 8G Fixes rust-lang#15931
epage
added a commit
to epage/cargo
that referenced
this pull request
Oct 21, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. For cargo `cargo test --no-run` build+target dir: - master: 3.6G - this PR: 2.9G For bevy `cargo test --no-run` build+target dir: - master: 369G - this PR: 348G Surprised at how much space was taken up: - `build/`: 189G -> 174G - `examples/`: 175G -> 168G (across 364 examples) - `incremental/`: 14G -> 8G Fixes rust-lang#15931
epage
added a commit
to epage/cargo
that referenced
this pull request
Oct 21, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. For cargo `cargo test --no-run` build+target dir: - master: 3.6G - this PR: 2.9G For bevy `cargo test --no-run` build+target dir: - master: 369G - this PR: 348G Surprised at how much space was taken up: - `build/`: 189G -> 174G - `examples/`: 175G -> 168G (across 364 examples) - `incremental/`: 14G -> 8G Fixes rust-lang#15931
epage
added a commit
to epage/cargo
that referenced
this pull request
Oct 21, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. For cargo `cargo test --no-run` build+target dir: - master: 3.6G - this PR: 2.9G For bevy `cargo test --no-run` build+target dir: - master: 369G - this PR: 348G Surprised at how much space was taken up: - `build/`: 189G -> 174G - `examples/`: 175G -> 168G (across 364 examples) - `incremental/`: 14G -> 8G Fixes rust-lang#15931
epage
added a commit
to epage/cargo
that referenced
this pull request
Oct 21, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. For cargo `cargo test --no-run` build+target dir: - master: 3.6G - this PR: 2.9G For bevy `cargo test --no-run` build+target dir: - master: 369G - this PR: 348G Surprised at how much space was taken up: - `build/`: 189G -> 174G - `examples/`: 175G -> 168G (across 364 examples) - `incremental/`: 14G -> 8G Fixes rust-lang#15931
epage
added a commit
to epage/cargo
that referenced
this pull request
Oct 28, 2026
With rust-lang#17215 merged, users can set the new `debug` profile as their default build profile without an MSRV bump and get the same behavior between previous versions of Cargo and those that include this change. There is still the possibility of `opt-level` but that is less certain. For cargo `cargo test --no-run` build+target dir: - master: 3.6G - this PR: 2.9G For bevy `cargo test --no-run` build+target dir: - master: 369G - this PR: 348G Surprised at how much space was taken up: - `build/`: 189G -> 174G - `examples/`: 175G -> 168G (across 364 examples) - `incremental/`: 14G -> 8G Fixes rust-lang#15931
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.
View all comments
What does this PR try to resolve?
This adds
build.profileto smooth out the transition for #15931 by allowing users to change to thedebugprofile by default.This also adds
install.profilebuild.profiledoes not applyHow to test and review this PR?
This is part of #15931
devprofile changes are deferred for 1+ releasesHow should
testandbenchbe handled? We went withcargo testhavingbuild.profileoverride the defaulttestso users will get consistent behavior betweencargo buildandcargo test. Alternatively, we could have told users to setprofile.test.inherits = "debug". Changing the inheritance is even less obvious though it is likely to run into fewer issues if projects change thetestprofile.