Skip to content

docs(workspace): add recommended structure subsection to members field#17166

Open
raushan728 wants to merge 1 commit into
rust-lang:masterfrom
raushan728:issues/11234
Open

docs(workspace): add recommended structure subsection to members field#17166
raushan728 wants to merge 1 commit into
rust-lang:masterfrom
raushan728:issues/11234

Conversation

@raushan728

Copy link
Copy Markdown
Contributor

Closes #11234

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 2, 2026
@rustbot

rustbot commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

r? @epage

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

Comment thread src/doc/src/reference/workspaces.md Outdated
@raushan728 raushan728 changed the title docs(workspace): add recommended structure section docs(workspace): add recommended structure subsection to members field Jul 3, 2026
@raushan728
raushan728 requested a review from weihanglo July 3, 2026 04:00
@rustbot

This comment has been minimized.

@rustbot

rustbot commented Jul 19, 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.

Comment on lines 106 to 112
typical filename glob patterns like `*` and `?`.

### Recommended structure

It is recommended to keep all member packages in a flat directory (commonly `crates/`) and use a glob pattern for the `members` field, e.g. `members = ["crates/*"]`. This makes it easy to add new members with `cargo new` / `cargo init` without editing the root manifest.

The `exclude` key can be used to prevent paths from being included in a

@epage epage Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While this is adding a new section, it is taking existing content and putting it in that section.

Likely we should have a recommendation block like we do at https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#version-metadata that is linked to from #11234 (comment)

View changes since the review

Comment on lines 106 to 112
typical filename glob patterns like `*` and `?`.

### Recommended structure

It is recommended to keep all member packages in a flat directory (commonly `crates/`) and use a glob pattern for the `members` field, e.g. `members = ["crates/*"]`. This makes it easy to add new members with `cargo new` / `cargo init` without editing the root manifest.

The `exclude` key can be used to prevent paths from being included in a

@epage epage Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The framing on this feels a bit strong and "it is recommended" is passive voice.

I'm hoping mirroring what we do at https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#version-metadata would help

View changes since the review

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

Labels

A-documenting-cargo-itself Area: Cargo's documentation 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.

cargo init is not working great when creating a new workspace with multiple members

4 participants