From 282e482a51a901080dcec04c8e9a8c067a6d5982 Mon Sep 17 00:00:00 2001 From: Raushan kumar Date: Fri, 24 Jul 2026 10:29:00 +0000 Subject: [PATCH] docs(workspace): add recommended structure to members field Adds a recommendation block advising users to keep workspace members in a flat directory and use glob patterns. --- doc/book/src/reference/workspaces.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/book/src/reference/workspaces.md b/doc/book/src/reference/workspaces.md index a923e3ebd18..fb1cc6e6efd 100644 --- a/doc/book/src/reference/workspaces.md +++ b/doc/book/src/reference/workspaces.md @@ -105,6 +105,10 @@ should be an array of strings containing directories with `Cargo.toml` files. The `members` list also supports [globs] to match multiple paths, using typical filename glob patterns like `*` and `?`. +**Recommendation:** Keep all member packages in a flat directory (commonly `crates/`) +and use a glob pattern for the `members` field, e.g. +`members = ["crates/*"]`. This minimizes churn in maintaining the `members` list. + The `exclude` key can be used to prevent paths from being included in a workspace. This can be useful if some path dependencies aren't desired to be in the workspace at all, or using a glob pattern and you want to remove a