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