Skip to content

Commit 82d563b

Browse files
committed
Document workspace.default-members
1 parent 1240f42 commit 82d563b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/doc/manifest.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,19 @@ crate will be treated as a normal package, as well as a workspace. If the
520520
manifest*.
521521

522522
When working with *virtual manifests*, package-related cargo commands, like
523-
`cargo build`, default to all packages in the workspace as if `--all` was used.
524-
This can be changed by passing a `--package` or `-p` command-line parameters.
523+
`cargo build`, default to the set of packages specified by the `default-members`
524+
configuration:
525+
526+
```toml
527+
[workspace]
528+
members = ["path/to/member1", "path/to/member2", "path/to/member3/*"]
529+
530+
# The members that commands like `cargo build` apply to by deault.
531+
# This must expand to a subset of `members`.
532+
# Optional key, defaults to the same as `members`
533+
# (as if `--all` were used on the command line).
534+
default-members = ["path/to/member2", "path/to/member3/*"]
535+
```
525536

526537
# The project layout
527538

0 commit comments

Comments
 (0)