Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the default location where cargo install emitting build artifacts #9189

Merged
merged 4 commits into from
Feb 20, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/doc/man/cargo-install.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# cargo-install(1)
{{*set actionverb="Install"}}
{{*set temp-target-dir=true}}

## NAME

Expand Down
3 changes: 2 additions & 1 deletion src/doc/man/generated_txt/cargo-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ OPTIONS
also be specified with the CARGO_TARGET_DIR environment variable, or
the build.target-dir config value
<https://doc.rust-lang.org/cargo/reference/config.html>. Defaults to
target in the root of the workspace.
a new temporary folder located in the temporary directory of the
platform.

--debug
Build with the dev profile instead the release profile.
Expand Down
7 changes: 5 additions & 2 deletions src/doc/man/includes/options-target-dir.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{{#option "`--target-dir` _directory_"}}
Directory for all generated artifacts and intermediate files. May also be
specified with the `CARGO_TARGET_DIR` environment variable, or the
`build.target-dir` [config value](../reference/config.html). Defaults
to `target` in the root of the workspace.
`build.target-dir` [config value](../reference/config.html).
{{#if temp-target-dir}} Defaults to a new temporary folder located in the
temporary directory of the platform.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some subtly here that I think should be included. When using cargo install --path, it will use the target directory in the workspace. Can you include that, too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this 😄. The text has been updated.

{{else}} Defaults to `target` in the root of the workspace.
{{/if}}
{{/option}}
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ target artifacts are placed in a separate directory. See the
<dt class="option-term" id="option-cargo-bench---target-dir"><a class="option-anchor" href="#option-cargo-bench---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ selection.</dd>
<dt class="option-term" id="option-cargo-build---target-dir"><a class="option-anchor" href="#option-cargo-build---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>



Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ used.</dd>
<dt class="option-term" id="option-cargo-check---target-dir"><a class="option-anchor" href="#option-cargo-check---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ the target directory.</dd>
<dt class="option-term" id="option-cargo-clean---target-dir"><a class="option-anchor" href="#option-cargo-clean---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>



Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ selection.</dd>
<dt class="option-term" id="option-cargo-doc---target-dir"><a class="option-anchor" href="#option-cargo-doc---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ used.</dd>
<dt class="option-term" id="option-cargo-fix---target-dir"><a class="option-anchor" href="#option-cargo-fix---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
6 changes: 4 additions & 2 deletions src/doc/src/commands/cargo-install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# cargo-install(1)



## NAME

cargo-install - Build and install a Rust binary
Expand Down Expand Up @@ -215,8 +216,9 @@ target artifacts are placed in a separate directory. See the
<dt class="option-term" id="option-cargo-install---target-dir"><a class="option-anchor" href="#option-cargo-install---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to a new temporary folder located in the
temporary directory of the platform.</dd>



Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ target artifacts are placed in a separate directory. See the
<dt class="option-term" id="option-cargo-package---target-dir"><a class="option-anchor" href="#option-cargo-package---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>



Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ target artifacts are placed in a separate directory. See the
<dt class="option-term" id="option-cargo-publish---target-dir"><a class="option-anchor" href="#option-cargo-publish---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>



Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ selection.</dd>
<dt class="option-term" id="option-cargo-run---target-dir"><a class="option-anchor" href="#option-cargo-run---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-rustc.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ selection.</dd>
<dt class="option-term" id="option-cargo-rustc---target-dir"><a class="option-anchor" href="#option-cargo-rustc---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ selection.</dd>
<dt class="option-term" id="option-cargo-rustdoc---target-dir"><a class="option-anchor" href="#option-cargo-rustdoc---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/commands/cargo-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ selection.</dd>
<dt class="option-term" id="option-cargo-test---target-dir"><a class="option-anchor" href="#option-cargo-test---target-dir"></a><code>--target-dir</code> <em>directory</em></dt>
<dd class="option-desc">Directory for all generated artifacts and intermediate files. May also be
specified with the <code>CARGO_TARGET_DIR</code> environment variable, or the
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>. Defaults
to <code>target</code> in the root of the workspace.</dd>
<code>build.target-dir</code> <a href="../reference/config.html">config value</a>.
Defaults to <code>target</code> in the root of the workspace.</dd>


</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-bench.1
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ target artifacts are placed in a separate directory. See the
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
By default the Rust test harness hides output from benchmark execution to keep
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-build.1
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ selection.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.sp
\fB\-\-out\-dir\fR \fIdirectory\fR
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-check.1
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ used.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-clean.1
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Clean all artifacts that were built with the \fBrelease\fR or \fBbench\fR profil
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.sp
\fB\-\-target\fR \fItriple\fR
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-doc.1
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ selection.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-fix.1
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ used.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
Expand Down
5 changes: 3 additions & 2 deletions src/etc/man/cargo-install.1
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,9 @@ target artifacts are placed in a separate directory. See the
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to a new temporary folder located in the
temporary directory of the platform.
.RE
.sp
\fB\-\-debug\fR
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-package.1
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ target artifacts are placed in a separate directory. See the
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Feature Selection"
The feature flags allow you to control which features are enabled. When no
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-publish.1
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ target artifacts are placed in a separate directory. See the
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Feature Selection"
The feature flags allow you to control which features are enabled. When no
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-run.1
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ selection.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-rustc.1
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ selection.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-rustdoc.1
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ selection.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-test.1
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ selection.
.RS 4
Directory for all generated artifacts and intermediate files. May also be
specified with the \fBCARGO_TARGET_DIR\fR environment variable, or the
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. Defaults
to \fBtarget\fR in the root of the workspace.
\fBbuild.target\-dir\fR \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
By default the Rust test harness hides output from test execution to keep
Expand Down