|
1 | 1 | # cargo-package(1)
|
2 | 2 |
|
3 | 3 |
|
| 4 | + |
4 | 5 | ## NAME
|
5 | 6 |
|
6 | 7 | cargo-package - Assemble the local package into a distributable tarball
|
@@ -68,6 +69,47 @@ or the license).</dd>
|
68 | 69 |
|
69 | 70 | </dl>
|
70 | 71 |
|
| 72 | +### Package Selection |
| 73 | + |
| 74 | +By default, when no package selection options are given, the packages selected |
| 75 | +depend on the selected manifest file (based on the current working directory if |
| 76 | +`--manifest-path` is not given). If the manifest is the root of a workspace then |
| 77 | +the workspaces default members are selected, otherwise only the package defined |
| 78 | +by the manifest will be selected. |
| 79 | + |
| 80 | +The default members of a workspace can be set explicitly with the |
| 81 | +`workspace.default-members` key in the root manifest. If this is not set, a |
| 82 | +virtual workspace will include all workspace members (equivalent to passing |
| 83 | +`--workspace`), and a non-virtual workspace will include only the root crate itself. |
| 84 | + |
| 85 | +<dl> |
| 86 | + |
| 87 | +<dt class="option-term" id="option-cargo-package--p"><a class="option-anchor" href="#option-cargo-package--p"></a><code>-p</code> <em>spec</em>...</dt> |
| 88 | +<dt class="option-term" id="option-cargo-package---package"><a class="option-anchor" href="#option-cargo-package---package"></a><code>--package</code> <em>spec</em>...</dt> |
| 89 | +<dd class="option-desc">Package only the specified packages. See <a href="cargo-pkgid.html">cargo-pkgid(1)</a> for the |
| 90 | +SPEC format. This flag may be specified multiple times and supports common Unix |
| 91 | +glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell accidentally |
| 92 | +expanding glob patterns before Cargo handles them, you must use single quotes or |
| 93 | +double quotes around each pattern.</dd> |
| 94 | + |
| 95 | + |
| 96 | +<dt class="option-term" id="option-cargo-package---workspace"><a class="option-anchor" href="#option-cargo-package---workspace"></a><code>--workspace</code></dt> |
| 97 | +<dd class="option-desc">Package all members in the workspace.</dd> |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +<dt class="option-term" id="option-cargo-package---exclude"><a class="option-anchor" href="#option-cargo-package---exclude"></a><code>--exclude</code> <em>SPEC</em>...</dt> |
| 103 | +<dd class="option-desc">Exclude the specified packages. Must be used in conjunction with the |
| 104 | +<code>--workspace</code> flag. This flag may be specified multiple times and supports |
| 105 | +common Unix glob patterns like <code>*</code>, <code>?</code> and <code>[]</code>. However, to avoid your shell |
| 106 | +accidentally expanding glob patterns before Cargo handles them, you must use |
| 107 | +single quotes or double quotes around each pattern.</dd> |
| 108 | + |
| 109 | + |
| 110 | +</dl> |
| 111 | + |
| 112 | + |
71 | 113 | ### Compilation Options
|
72 | 114 |
|
73 | 115 | <dl>
|
|
0 commit comments