@@ -77,15 +77,58 @@ which defaults to <code>crates-io</code>.</dd>
7777
7878### Package Selection
7979
80- By default, the package in the current working directory is selected. The ` -p `
81- flag can be used to choose a different package in a workspace.
80+ By default, when no package selection options are given, the packages selected
81+ depend on the selected manifest file (based on the current working directory if
82+ ` --manifest-path ` is not given). If the manifest is the root of a workspace then
83+ the workspaces default members are selected, otherwise only the package defined
84+ by the manifest will be selected.
85+
86+ The default members of a workspace can be set explicitly with the
87+ ` workspace.default-members ` key in the root manifest. If this is not set, a
88+ virtual workspace will include all workspace members (equivalent to passing
89+ ` --workspace ` ), and a non-virtual workspace will include only the root crate itself.
90+
91+ Selecting more than one package is unstable and available only on the
92+ [ nightly channel] ( https://doc.rust-lang.org/book/appendix-07-nightly-rust.html )
93+ and requires the ` -Z package-workspace ` flag to enable.
94+ See < https://github.com/rust-lang/cargo/issues/10948 > for more information.
95+
8296
8397<dl >
8498
85- <dt class =" option-term " id =" option-cargo-publish--p " ><a class =" option-anchor " href =" #option-cargo-publish--p " ></a ><code >-p</code > <em >spec</em ></dt >
86- <dt class =" option-term " id =" option-cargo-publish---package " ><a class =" option-anchor " href =" #option-cargo-publish---package " ></a ><code >--package</code > <em >spec</em ></dt >
87- <dd class =" option-desc " >The package to publish. See <a href =" cargo-pkgid.html " >cargo-pkgid(1)</a > for the SPEC
88- format.</dd >
99+ <dt class =" option-term " id =" option-cargo-publish--p " ><a class =" option-anchor " href =" #option-cargo-publish--p " ></a ><code >-p</code > <em >spec</em >…</dt >
100+ <dt class =" option-term " id =" option-cargo-publish---package " ><a class =" option-anchor " href =" #option-cargo-publish---package " ></a ><code >--package</code > <em >spec</em >…</dt >
101+ <dd class =" option-desc " >Publish only the specified packages. See <a href =" cargo-pkgid.html " >cargo-pkgid(1)</a > for the
102+ SPEC format. This flag may be specified multiple times and supports common Unix
103+ glob patterns like <code >* </code >, <code >?</code > and <code >[ ] </code >. However, to avoid your shell accidentally
104+ expanding glob patterns before Cargo handles them, you must use single quotes or
105+ double quotes around each pattern.</dd >
106+
107+
108+ Selecting more than one package with this option is unstable and available only
109+ on the
110+ [ nightly channel] ( https://doc.rust-lang.org/book/appendix-07-nightly-rust.html )
111+ and requires the ` -Z package-workspace ` flag to enable.
112+ See < https://github.com/rust-lang/cargo/issues/10948 > for more information.
113+
114+ <dt class =" option-term " id =" option-cargo-publish---workspace " ><a class =" option-anchor " href =" #option-cargo-publish---workspace " ></a ><code >--workspace</code ></dt >
115+ <dd class =" option-desc " >Publish all members in the workspace.</p >
116+ <p >This option is unstable and available only on the
117+ <a href =" https://doc.rust-lang.org/book/appendix-07-nightly-rust.html " >nightly channel</a >
118+ and requires the <code >-Z package-workspace</code > flag to enable.
119+ See <a href =" https://github.com/rust-lang/cargo/issues/10948 " >https://github.com/rust-lang/cargo/issues/10948 </a > for more information.</dd >
120+
121+
122+ <dt class =" option-term " id =" option-cargo-publish---exclude " ><a class =" option-anchor " href =" #option-cargo-publish---exclude " ></a ><code >--exclude</code > <em >SPEC</em >…</dt >
123+ <dd class =" option-desc " >Exclude the specified packages. Must be used in conjunction with the
124+ <code >--workspace</code > flag. This flag may be specified multiple times and supports
125+ common Unix glob patterns like <code >* </code >, <code >?</code > and <code >[ ] </code >. However, to avoid your shell
126+ accidentally expanding glob patterns before Cargo handles them, you must use
127+ single quotes or double quotes around each pattern.</p >
128+ <p >This option is unstable and available only on the
129+ <a href =" https://doc.rust-lang.org/book/appendix-07-nightly-rust.html " >nightly channel</a >
130+ and requires the <code >-Z package-workspace</code > flag to enable.
131+ See <a href =" https://github.com/rust-lang/cargo/issues/10948 " >https://github.com/rust-lang/cargo/issues/10948 </a > for more information.</dd >
89132
90133
91134</dl >
0 commit comments