]> git.proxmox.com Git - rustc.git/blob - src/tools/cargo/src/doc/man/includes/section-package-selection.md
New upstream version 1.70.0+dfsg2
[rustc.git] / src / tools / cargo / src / doc / man / includes / section-package-selection.md
1 ### Package Selection
2
3 By default, when no package selection options are given, the packages selected
4 depend on the selected manifest file (based on the current working directory if
5 `--manifest-path` is not given). If the manifest is the root of a workspace then
6 the workspaces default members are selected, otherwise only the package defined
7 by the manifest will be selected.
8
9 The default members of a workspace can be set explicitly with the
10 `workspace.default-members` key in the root manifest. If this is not set, a
11 virtual workspace will include all workspace members (equivalent to passing
12 `--workspace`), and a non-virtual workspace will include only the root crate itself.
13
14 {{#options}}
15
16 {{#option "`-p` _spec_..." "`--package` _spec_..."}}
17 {{actionverb}} only the specified packages. See {{man "cargo-pkgid" 1}} for the
18 SPEC format. This flag may be specified multiple times and supports common Unix
19 glob patterns like `*`, `?` and `[]`. However, to avoid your shell accidentally
20 expanding glob patterns before Cargo handles them, you must use single quotes or
21 double quotes around each pattern.
22 {{/option}}
23
24 {{#option "`--workspace`" }}
25 {{actionverb}} all members in the workspace.
26 {{/option}}
27
28 {{#unless noall}}
29 {{#option "`--all`" }}
30 Deprecated alias for `--workspace`.
31 {{/option}}
32 {{/unless}}
33
34 {{#option "`--exclude` _SPEC_..." }}
35 Exclude the specified packages. Must be used in conjunction with the
36 `--workspace` flag. This flag may be specified multiple times and supports
37 common Unix glob patterns like `*`, `?` and `[]`. However, to avoid your shell
38 accidentally expanding glob patterns before Cargo handles them, you must use
39 single quotes or double quotes around each pattern.
40 {{/option}}
41
42 {{/options}}