Skip to content

New cargo layout#368

Merged
oli-obk merged 2 commits intooli-obk:mainfrom
ranger-ross:new-cargo-layout
May 5, 2026
Merged

New cargo layout#368
oli-obk merged 2 commits intooli-obk:mainfrom
ranger-ross:new-cargo-layout

Conversation

@ranger-ross
Copy link
Copy Markdown
Contributor

@ranger-ross ranger-ross commented May 4, 2026

This PR adds support for Cargo's new build-dir layout tracked in rust-lang/cargo#15010.
I opted to not modify the tests as some of them have paths and it felt like it was going to be painful to keep both layouts in tests.
I think we can update the tests when the new build-dir lands on stable. wdyt?

Also I'd appreciate if you could cut a new release once this is merged as it blocks rust-lang/rust#155439

TODO (check if already done)

  • Add tests
  • Add CHANGELOG.md entry
  • Bumped minor version and committed lockfiles in case a release is desired
  • check if you used AI on this PR

@oli-obk
Copy link
Copy Markdown
Owner

oli-obk commented May 4, 2026

I think we can update the tests when the new build-dir lands on stable. wdyt?

yea that wfm

is there a better way to detect whether the new layout is active? Some env var or -Z flag that we could process and switch?

Comment thread Cargo.toml Outdated
@ranger-ross
Copy link
Copy Markdown
Contributor Author

is there a better way to detect whether the new layout is active? Some env var or -Z flag that we could process and switch?

There is -Zbuild-dir-new-layout (and CARGO_UNSTABLE_BUILD_DIR_NEW_LAYOUT).
Though the goal is to stabilize this soon. (The stabilization PR has already been FCP'd and we just need to enable it in rl/r so that we can update the Cargo submodule)

@oli-obk oli-obk enabled auto-merge May 5, 2026 04:04
@oli-obk oli-obk merged commit 04c5b9c into oli-obk:main May 5, 2026
8 checks passed
@ranger-ross
Copy link
Copy Markdown
Contributor Author

btw, thank you for the quick review and release! ❤️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants