-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs(layout): Updated layout module docs to document new layout #16502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use |
| //! | ||
| //! As of early 2026, Cargo is restructuring the layout and supports 2 layouts. | ||
| //! * the original layout organizing files by type | ||
| //! * the new "build unit" based layout | ||
| //! | ||
| //! For more info the layout transition see: [#15010](https://github.com/rust-lang/cargo/issues/15010) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we track removal of this on stabilization?
| //! The new build unit based layout has separate structures for `artifact-dir` and `build-dir`. | ||
| //! By default both of these point to `target` in the workspace root. | ||
| //! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an original layout heading but no heading for the new layout
| //! | ||
| //! For more info the layout transition see: [#15010](https://github.com/rust-lang/cargo/issues/15010) | ||
| //! | ||
| //! ### original layout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| //! ### original layout | |
| //! ### Original layout |
| //! The new build unit based layout has separate structures for `artifact-dir` and `build-dir`. | ||
| //! By default both of these point to `target` in the workspace root. | ||
| //! | ||
| //! ### artifact-dir layout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| //! ### artifact-dir layout | |
| //! ### `artifact-dir` layout |
| //! # Note that named profiles will soon be included as separate directories | ||
| //! # here. They have a restricted format, similar to Rust identifiers, so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean about named profiles will be separate directories?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this was copied over. Probably should be removed from the other section in a separate commit
| //! # Cargo-specific directories added in the future should use some prefix | ||
| //! # like `.` to avoid name collisions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this relevant to build-dir?
| //! # Root directory for all compiled examples. | ||
| //! examples/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't have this in build-dir, right?
| //! # This is the directory for the rustc artifacts of this unit except build | ||
| //! # scripts, examples, and test and bench executables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These exceptions are removed, right?
| //! # If the unit is a build script compilation, the build script | ||
| //! # binary will be stored here. | ||
| //! build-script/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need these to be different than deps?
What does this PR try to resolve?
This PR updates the layout module docs to reflect the update layout structure changes made as part of #15010
How to test and review this PR?
no response