File tree Expand file tree Collapse file tree 5 files changed +36
-8
lines changed Expand file tree Collapse file tree 5 files changed +36
-8
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,14 @@ cargo-locate-project - Print a JSON representation of a Cargo.toml file's locati
10
10
11
11
## DESCRIPTION
12
12
13
- This command will print a JSON object to stdout with the full path to the
14
- ` Cargo.toml ` manifest.
13
+ This command will print a JSON object to stdout with the full path to the manifest. The
14
+ manifest is found by searching upward for a file named ` Cargo.toml ` starting from the current
15
+ working directory.
16
+
17
+ If the project happens to be a part of a workspace, the manifest of the project, rather than
18
+ the workspace root, is output. This can be overriden by the ` --workspace ` flag. The root
19
+ workspace is found by traversing further upward or by using the field ` package.workspace ` after
20
+ locating the manifest of a workspace member.
15
21
16
22
## OPTIONS
17
23
Original file line number Diff line number Diff line change @@ -9,7 +9,14 @@ SYNOPSIS
9
9
10
10
DESCRIPTION
11
11
This command will print a JSON object to stdout with the full path to
12
- the Cargo.toml manifest.
12
+ the manifest. The manifest is found by searching upward for a file named
13
+ Cargo.toml starting from the current working directory.
14
+
15
+ If the project happens to be a part of a workspace, the manifest of the
16
+ project, rather than the workspace root, is output. This can be
17
+ overriden by the --workspace flag. The root workspace is found by
18
+ traversing further upward or by using the field package.workspace after
19
+ locating the manifest of a workspace member.
13
20
14
21
OPTIONS
15
22
--workspace
Original file line number Diff line number Diff line change @@ -10,8 +10,14 @@ cargo-locate-project - Print a JSON representation of a Cargo.toml file's locati
10
10
11
11
## DESCRIPTION
12
12
13
- This command will print a JSON object to stdout with the full path to the
14
- ` Cargo.toml ` manifest.
13
+ This command will print a JSON object to stdout with the full path to the manifest. The
14
+ manifest is found by searching upward for a file named ` Cargo.toml ` starting from the current
15
+ working directory.
16
+
17
+ If the project happens to be a part of a workspace, the manifest of the project, rather than
18
+ the workspace root, is output. This can be overriden by the ` --workspace ` flag. The root
19
+ workspace is found by traversing further upward or by using the field ` package.workspace ` after
20
+ locating the manifest of a workspace member.
15
21
16
22
## OPTIONS
17
23
Original file line number Diff line number Diff line change 1
1
## The Manifest Format
2
2
3
3
The ` Cargo.toml ` file for each package is called its * manifest* . It is written
4
- in the [ TOML] format. Every manifest file consists of the following sections:
4
+ in the [ TOML] format. It contains metadata that is needed to compile the package. Checkout
5
+ the ` cargo locate-project ` section for more detail on how cargo finds the manifest file.
6
+
7
+ Every manifest file consists of the following sections:
5
8
6
9
* [ ` cargo-features ` ] ( unstable.md ) — Unstable, nightly-only features.
7
10
* [ ` [package] ` ] ( #the-package-section ) — Defines a package.
Original file line number Diff line number Diff line change @@ -8,8 +8,14 @@ cargo\-locate\-project \- Print a JSON representation of a Cargo.toml file's loc
8
8
.SH "SYNOPSIS"
9
9
\fB cargo locate \- project \fR [\fI options \fR ]
10
10
.SH "DESCRIPTION"
11
- This command will print a JSON object to stdout with the full path to the
12
- \fB Cargo.toml \fR manifest.
11
+ This command will print a JSON object to stdout with the full path to the manifest. The
12
+ manifest is found by searching upward for a file named \fB Cargo.toml \fR starting from the current
13
+ working directory.
14
+ .sp
15
+ If the project happens to be a part of a workspace, the manifest of the project, rather than
16
+ the workspace root, is output. This can be overriden by the \fB \-\- workspace \fR flag. The root
17
+ workspace is found by traversing further upward or by using the field \fB package.workspace \fR after
18
+ locating the manifest of a workspace member.
13
19
.SH "OPTIONS"
14
20
.sp
15
21
\fB \-\- workspace \fR
You can’t perform that action at this time.
0 commit comments