Skip to content

Conversation

@ranger-ross
Copy link
Member

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

@rustbot rustbot added A-layout Area: target output directory layout, naming, and organization S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 13, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2026

r? @weihanglo

rustbot has assigned @weihanglo.
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

Comment on lines +5 to +10
//!
//! 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)
Copy link
Contributor

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?

Comment on lines +109 to +111
//! 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.
//!
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//! ### 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//! ### artifact-dir layout
//! ### `artifact-dir` layout

Comment on lines +121 to +122
//! # Note that named profiles will soon be included as separate directories
//! # here. They have a restricted format, similar to Rust identifiers, so
Copy link
Contributor

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?

Copy link
Contributor

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

Comment on lines +156 to +157
//! # Cargo-specific directories added in the future should use some prefix
//! # like `.` to avoid name collisions.
Copy link
Contributor

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?

Comment on lines +164 to +165
//! # Root directory for all compiled examples.
//! examples/
Copy link
Contributor

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?

Comment on lines +181 to +182
//! # This is the directory for the rustc artifacts of this unit except build
//! # scripts, examples, and test and bench executables.
Copy link
Contributor

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?

Comment on lines +203 to +205
//! # If the unit is a build script compilation, the build script
//! # binary will be stored here.
//! build-script/
Copy link
Contributor

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?

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

Labels

A-layout Area: target output directory layout, naming, and organization 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