Skip to content

Commit 9b5d4b7

Browse files
committed
Auto merge of #6553 - ehuss:doc-publish-features, r=alexcrichton
Add documentation for new package/publish feature flags. Added in #6453.
2 parents 4f07147 + ed5a798 commit 9b5d4b7

File tree

6 files changed

+104
-4
lines changed

6 files changed

+104
-4
lines changed

src/doc/man/cargo-package.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ include::options-target-triple.adoc[]
5959

6060
include::options-target-dir.adoc[]
6161

62+
include::options-features.adoc[]
63+
6264
=== Manifest Options
6365

6466
include::options-manifest-path.adoc[]

src/doc/man/cargo-publish.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ include::options-target-triple.adoc[]
5757

5858
include::options-target-dir.adoc[]
5959

60+
include::options-features.adoc[]
61+
6062
=== Manifest Options
6163

6264
include::options-manifest-path.adoc[]

src/doc/man/generated/cargo-package.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,32 @@ <h3 id="cargo_package_compilation_options">Compilation Options</h3>
119119
</div>
120120
</div>
121121
<div class="sect2">
122+
<h3 id="cargo_package_feature_selection">Feature Selection</h3>
123+
<div class="paragraph">
124+
<p>When no feature options are given, the <code>default</code> feature is activated for
125+
every selected package.</p>
126+
</div>
127+
<div class="dlist">
128+
<dl>
129+
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
130+
<dd>
131+
<p>Space or comma separated list of features to activate. These features only
132+
apply to the current directory&#8217;s package. Features of direct dependencies
133+
may be enabled with <code>&lt;dep-name&gt;/&lt;feature-name&gt;</code> syntax.</p>
134+
</dd>
135+
<dt class="hdlist1"><strong>--all-features</strong></dt>
136+
<dd>
137+
<p>Activate all available features of all selected packages.</p>
138+
</dd>
139+
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
140+
<dd>
141+
<p>Do not activate the <code>default</code> feature of the current directory&#8217;s
142+
package.</p>
143+
</dd>
144+
</dl>
145+
</div>
146+
</div>
147+
<div class="sect2">
122148
<h3 id="cargo_package_manifest_options">Manifest Options</h3>
123149
<div class="dlist">
124150
<dl>

src/doc/man/generated/cargo-publish.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,32 @@ <h3 id="cargo_publish_compilation_options">Compilation Options</h3>
118118
</div>
119119
</div>
120120
<div class="sect2">
121+
<h3 id="cargo_publish_feature_selection">Feature Selection</h3>
122+
<div class="paragraph">
123+
<p>When no feature options are given, the <code>default</code> feature is activated for
124+
every selected package.</p>
125+
</div>
126+
<div class="dlist">
127+
<dl>
128+
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
129+
<dd>
130+
<p>Space or comma separated list of features to activate. These features only
131+
apply to the current directory&#8217;s package. Features of direct dependencies
132+
may be enabled with <code>&lt;dep-name&gt;/&lt;feature-name&gt;</code> syntax.</p>
133+
</dd>
134+
<dt class="hdlist1"><strong>--all-features</strong></dt>
135+
<dd>
136+
<p>Activate all available features of all selected packages.</p>
137+
</dd>
138+
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
139+
<dd>
140+
<p>Do not activate the <code>default</code> feature of the current directory&#8217;s
141+
package.</p>
142+
</dd>
143+
</dl>
144+
</div>
145+
</div>
146+
<div class="sect2">
121147
<h3 id="cargo_publish_manifest_options">Manifest Options</h3>
122148
<div class="dlist">
123149
<dl>

src/etc/man/cargo-package.1

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-package
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 1.5.8
5-
.\" Date: 2018-12-20
5+
.\" Date: 2019-01-14
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-PACKAGE" "1" "2018-12-20" "\ \&" "\ \&"
10+
.TH "CARGO\-PACKAGE" "1" "2019-01-14" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -171,6 +171,28 @@ specified with the \fBCARGO_TARGET_DIR\fP environment variable, or the
171171
Defaults
172172
to \fBtarget\fP in the root of the workspace.
173173
.RE
174+
.SS "Feature Selection"
175+
.sp
176+
When no feature options are given, the \fBdefault\fP feature is activated for
177+
every selected package.
178+
.sp
179+
\fB\-\-features\fP \fIFEATURES\fP
180+
.RS 4
181+
Space or comma separated list of features to activate. These features only
182+
apply to the current directory\(cqs package. Features of direct dependencies
183+
may be enabled with \fB<dep\-name>/<feature\-name>\fP syntax.
184+
.RE
185+
.sp
186+
\fB\-\-all\-features\fP
187+
.RS 4
188+
Activate all available features of all selected packages.
189+
.RE
190+
.sp
191+
\fB\-\-no\-default\-features\fP
192+
.RS 4
193+
Do not activate the \fBdefault\fP feature of the current directory\(cqs
194+
package.
195+
.RE
174196
.SS "Manifest Options"
175197
.sp
176198
\fB\-\-manifest\-path\fP \fIPATH\fP

src/etc/man/cargo-publish.1

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: cargo-publish
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 1.5.8
5-
.\" Date: 2018-12-20
5+
.\" Date: 2019-01-14
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "CARGO\-PUBLISH" "1" "2018-12-20" "\ \&" "\ \&"
10+
.TH "CARGO\-PUBLISH" "1" "2019-01-14" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -162,6 +162,28 @@ specified with the \fBCARGO_TARGET_DIR\fP environment variable, or the
162162
Defaults
163163
to \fBtarget\fP in the root of the workspace.
164164
.RE
165+
.SS "Feature Selection"
166+
.sp
167+
When no feature options are given, the \fBdefault\fP feature is activated for
168+
every selected package.
169+
.sp
170+
\fB\-\-features\fP \fIFEATURES\fP
171+
.RS 4
172+
Space or comma separated list of features to activate. These features only
173+
apply to the current directory\(cqs package. Features of direct dependencies
174+
may be enabled with \fB<dep\-name>/<feature\-name>\fP syntax.
175+
.RE
176+
.sp
177+
\fB\-\-all\-features\fP
178+
.RS 4
179+
Activate all available features of all selected packages.
180+
.RE
181+
.sp
182+
\fB\-\-no\-default\-features\fP
183+
.RS 4
184+
Do not activate the \fBdefault\fP feature of the current directory\(cqs
185+
package.
186+
.RE
165187
.SS "Manifest Options"
166188
.sp
167189
\fB\-\-manifest\-path\fP \fIPATH\fP

0 commit comments

Comments
 (0)