diff --git a/src/doc/man/cargo-install.md b/src/doc/man/cargo-install.md
index 3e1bc02fe94..95f55002134 100644
--- a/src/doc/man/cargo-install.md
+++ b/src/doc/man/cargo-install.md
@@ -1,5 +1,6 @@
# cargo-install(1)
{{*set actionverb="Install"}}
+{{*set temp-target-dir=true}}
## NAME
diff --git a/src/doc/man/generated_txt/cargo-install.txt b/src/doc/man/generated_txt/cargo-install.txt
index a56e1797a9c..ce009c0cb68 100644
--- a/src/doc/man/generated_txt/cargo-install.txt
+++ b/src/doc/man/generated_txt/cargo-install.txt
@@ -190,7 +190,11 @@ OPTIONS
also be specified with the CARGO_TARGET_DIR environment variable, or
the build.target-dir config value
. Defaults to
- target in the root of the workspace.
+ a new temporary folder located in the temporary directory of the
+ platform.
+
+ When using --path, by default it will use target directory in the
+ workspace of the local crate unless --target-dir is specified.
--debug
Build with the dev profile instead the release profile.
diff --git a/src/doc/man/includes/options-target-dir.md b/src/doc/man/includes/options-target-dir.md
index 009790425cc..3646e951fbd 100644
--- a/src/doc/man/includes/options-target-dir.md
+++ b/src/doc/man/includes/options-target-dir.md
@@ -1,6 +1,13 @@
{{#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.
+
+When using `--path`, by default it will use `target` directory in the workspace
+of the local crate unless `--target-dir`
+is specified.
+{{else}} Defaults to `target` in the root of the workspace.
+{{/if}}
{{/option}}
diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md
index 36c4d7f9729..74b3d496a5e 100644
--- a/src/doc/src/commands/cargo-bench.md
+++ b/src/doc/src/commands/cargo-bench.md
@@ -250,8 +250,8 @@ target artifacts are placed in a separate directory. See the
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md
index f99d7b3f879..eda9cf0ed1c 100644
--- a/src/doc/src/commands/cargo-build.md
+++ b/src/doc/src/commands/cargo-build.md
@@ -196,8 +196,8 @@ selection.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md
index f2c0a891b09..421e5677cf1 100644
--- a/src/doc/src/commands/cargo-check.md
+++ b/src/doc/src/commands/cargo-check.md
@@ -210,8 +210,8 @@ used.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-clean.md b/src/doc/src/commands/cargo-clean.md
index 204307a3e46..33d6dc0e936 100644
--- a/src/doc/src/commands/cargo-clean.md
+++ b/src/doc/src/commands/cargo-clean.md
@@ -47,8 +47,8 @@ the target directory.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md
index 1521989185a..7640416f9e1 100644
--- a/src/doc/src/commands/cargo-doc.md
+++ b/src/doc/src/commands/cargo-doc.md
@@ -167,8 +167,8 @@ selection.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md
index eca6e68f0e0..19b5d3e34c6 100644
--- a/src/doc/src/commands/cargo-fix.md
+++ b/src/doc/src/commands/cargo-fix.md
@@ -270,8 +270,8 @@ used.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-install.md b/src/doc/src/commands/cargo-install.md
index b5d180363bc..1639b28cb6e 100644
--- a/src/doc/src/commands/cargo-install.md
+++ b/src/doc/src/commands/cargo-install.md
@@ -1,6 +1,7 @@
# cargo-install(1)
+
## NAME
cargo-install - Build and install a Rust binary
@@ -215,8 +216,12 @@ target artifacts are placed in a separate directory. See the
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to a new temporary folder located in the
+temporary directory of the platform.
+When using --path, by default it will use target directory in the workspace
+of the local crate unless --target-dir
+is specified.
diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md
index eca11d6e32b..e0935bd6154 100644
--- a/src/doc/src/commands/cargo-package.md
+++ b/src/doc/src/commands/cargo-package.md
@@ -88,8 +88,8 @@ target artifacts are placed in a separate directory. See the
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md
index 3f011423a96..511688c1d37 100644
--- a/src/doc/src/commands/cargo-publish.md
+++ b/src/doc/src/commands/cargo-publish.md
@@ -96,8 +96,8 @@ target artifacts are placed in a separate directory. See the
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-run.md b/src/doc/src/commands/cargo-run.md
index 93ede8f4063..938d8ef4dac 100644
--- a/src/doc/src/commands/cargo-run.md
+++ b/src/doc/src/commands/cargo-run.md
@@ -114,8 +114,8 @@ selection.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md
index d085baca898..002ef1ac550 100644
--- a/src/doc/src/commands/cargo-rustc.md
+++ b/src/doc/src/commands/cargo-rustc.md
@@ -183,8 +183,8 @@ selection.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md
index 173e0c2db54..cbd3db6e84e 100644
--- a/src/doc/src/commands/cargo-rustdoc.md
+++ b/src/doc/src/commands/cargo-rustdoc.md
@@ -196,8 +196,8 @@ selection.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md
index 445af59610a..8b4e2bd9c7e 100644
--- a/src/doc/src/commands/cargo-test.md
+++ b/src/doc/src/commands/cargo-test.md
@@ -276,8 +276,8 @@ selection.
--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. Defaults
-to target in the root of the workspace.
+build.target-dir config value.
+Defaults to target in the root of the workspace.
diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1
index d08d2cf2069..b91ee08ace3 100644
--- a/src/etc/man/cargo-bench.1
+++ b/src/etc/man/cargo-bench.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+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
diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1
index d57a484f9ad..0750677b125 100644
--- a/src/etc/man/cargo-build.1
+++ b/src/etc/man/cargo-build.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.sp
\fB\-\-out\-dir\fR \fIdirectory\fR
diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1
index 276f9e72019..453ca7fd785 100644
--- a/src/etc/man/cargo-check.1
+++ b/src/etc/man/cargo-check.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-clean.1 b/src/etc/man/cargo-clean.1
index 8b33ef9e037..0836166e677 100644
--- a/src/etc/man/cargo-clean.1
+++ b/src/etc/man/cargo-clean.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.sp
\fB\-\-target\fR \fItriple\fR
diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1
index 1f9bc3840a3..36856d96868 100644
--- a/src/etc/man/cargo-doc.1
+++ b/src/etc/man/cargo-doc.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1
index 97983d882d7..802e054166e 100644
--- a/src/etc/man/cargo-fix.1
+++ b/src/etc/man/cargo-fix.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-install.1 b/src/etc/man/cargo-install.1
index a755481fa38..1840182a258 100644
--- a/src/etc/man/cargo-install.1
+++ b/src/etc/man/cargo-install.1
@@ -246,8 +246,13 @@ 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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to a new temporary folder located in the
+temporary directory of the platform.
+.sp
+When using \fB\-\-path\fR, by default it will use \fBtarget\fR directory in the workspace
+of the local crate unless \fB\-\-target\-dir\fR
+is specified.
.RE
.sp
\fB\-\-debug\fR
diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1
index c2276e782ed..9fbce0bc0df 100644
--- a/src/etc/man/cargo-package.1
+++ b/src/etc/man/cargo-package.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+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
diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1
index 33920279f5a..04c2307ce3c 100644
--- a/src/etc/man/cargo-publish.1
+++ b/src/etc/man/cargo-publish.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+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
diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1
index 6979d7573d2..6dee945b170 100644
--- a/src/etc/man/cargo-run.1
+++ b/src/etc/man/cargo-run.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1
index 332ab85f4e2..88d8d7d6ea4 100644
--- a/src/etc/man/cargo-rustc.1
+++ b/src/etc/man/cargo-rustc.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1
index b483e8e959b..2845cf9d632 100644
--- a/src/etc/man/cargo-rustdoc.1
+++ b/src/etc/man/cargo-rustdoc.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+Defaults to \fBtarget\fR in the root of the workspace.
.RE
.SS "Display Options"
.sp
diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1
index d1402af9572..6ce5f90e1a4 100644
--- a/src/etc/man/cargo-test.1
+++ b/src/etc/man/cargo-test.1
@@ -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 \&. Defaults
-to \fBtarget\fR in the root of the workspace.
+\fBbuild.target\-dir\fR \fIconfig value\fR \&.
+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