Document `workspace.default-members`
authorSimon Sapin <simon.sapin@exyr.org>
Tue, 28 Nov 2017 18:10:20 +0000 (19:10 +0100)
committerSimon Sapin <simon.sapin@exyr.org>
Wed, 29 Nov 2017 09:59:19 +0000 (10:59 +0100)
src/doc/manifest.md

index b42e4df6ee7b99d0664f4e9da107d1e298bbe847..fbf575f4372e0a1451735a7c2eaffda2df2fef2f 100644 (file)
@@ -520,8 +520,19 @@ crate will be treated as a normal package, as well as a workspace. If the
 manifest*.
 
 When working with *virtual manifests*, package-related cargo commands, like
-`cargo build`, default to all packages in the workspace as if `--all` was used.
-This can be changed by passing a `--package` or `-p` command-line parameters.
+`cargo build`, default to the set of packages specified by the `default-members`
+configuration:
+
+```toml
+[workspace]
+members = ["path/to/member1", "path/to/member2", "path/to/member3/*"]
+
+# The members that commands like `cargo build` apply to by deault.
+# This must expand to a subset of `members`.
+# Optional key, defaults to the same as `members`
+# (as if `--all` were used on the command line).
+default-members = ["path/to/member2", "path/to/member3/*"]
+```
 
 # The project layout