blob: 4a73aed7c35f8c16d14ff9af492d99221c5a469e [file] [log] [blame]
Jeff Vander Stoep956d1432020-09-18 13:46:24 +02001'\" t
2.\" Title: cargo-locate-project
3.\" Author: [see the "AUTHOR(S)" section]
4.\" Generator: Asciidoctor 2.0.10
5.\" Date: 2019-09-05
6.\" Manual: \ \&
7.\" Source: \ \&
8.\" Language: English
9.\"
10.TH "CARGO\-LOCATE\-PROJECT" "1" "2019-09-05" "\ \&" "\ \&"
11.ie \n(.g .ds Aq \(aq
12.el .ds Aq '
13.ss \n[.ss] 0
14.nh
15.ad l
16.de URL
17\fI\\$2\fP <\\$1>\\$3
18..
19.als MTO URL
20.if \n[.g] \{\
21. mso www.tmac
22. am URL
23. ad l
24. .
25. am MTO
26. ad l
27. .
28. LINKSTYLE blue R < >
29.\}
30.SH "NAME"
31cargo\-locate\-project \- Print a JSON representation of a Cargo.toml file\(aqs location
32.SH "SYNOPSIS"
33.sp
34\fBcargo locate\-project [\fIOPTIONS\fP]\fP
35.SH "DESCRIPTION"
36.sp
37This command will print a JSON object to stdout with the full path to the
38\fBCargo.toml\fP manifest.
39.sp
40See also \fBcargo\-metadata\fP(1) which is capable of returning the path to a
41workspace root.
42.SH "OPTIONS"
43.SS "Display Options"
44.sp
45\fB\-v\fP, \fB\-\-verbose\fP
46.RS 4
47Use verbose output. May be specified twice for "very verbose" output which
48includes extra output such as dependency warnings and build script output.
49May also be specified with the \fBterm.verbose\fP
50.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
51.RE
52.sp
53\fB\-q\fP, \fB\-\-quiet\fP
54.RS 4
55No output printed to stdout.
56.RE
57.sp
58\fB\-\-color\fP \fIWHEN\fP
59.RS 4
60Control when colored output is used. Valid values:
61.sp
62.RS 4
63.ie n \{\
64\h'-04'\(bu\h'+03'\c
65.\}
66.el \{\
67. sp -1
68. IP \(bu 2.3
69.\}
70\fBauto\fP (default): Automatically detect if color support is available on the
71terminal.
72.RE
73.sp
74.RS 4
75.ie n \{\
76\h'-04'\(bu\h'+03'\c
77.\}
78.el \{\
79. sp -1
80. IP \(bu 2.3
81.\}
82\fBalways\fP: Always display colors.
83.RE
84.sp
85.RS 4
86.ie n \{\
87\h'-04'\(bu\h'+03'\c
88.\}
89.el \{\
90. sp -1
91. IP \(bu 2.3
92.\}
93\fBnever\fP: Never display colors.
94.RE
95.sp
96May also be specified with the \fBterm.color\fP
97.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
98.RE
99.SS "Manifest Options"
100.sp
101\fB\-\-manifest\-path\fP \fIPATH\fP
102.RS 4
103Path to the \fBCargo.toml\fP file. By default, Cargo searches for the
104\fBCargo.toml\fP file in the current directory or any parent directory.
105.RE
106.SS "Common Options"
107.sp
108\fB+TOOLCHAIN\fP
109.RS 4
110If Cargo has been installed with rustup, and the first argument to \fBcargo\fP
111begins with \fB+\fP, it will be interpreted as a rustup toolchain name (such
112as \fB+stable\fP or \fB+nightly\fP).
113See the \c
114.URL "https://github.com/rust\-lang/rustup/" "rustup documentation"
115for more information about how toolchain overrides work.
116.RE
117.sp
118\fB\-h\fP, \fB\-\-help\fP
119.RS 4
120Prints help information.
121.RE
122.sp
123\fB\-Z\fP \fIFLAG\fP...
124.RS 4
125Unstable (nightly\-only) flags to Cargo. Run \fBcargo \-Z help\fP for
126details.
127.RE
128.SH "ENVIRONMENT"
129.sp
130See \c
131.URL "https://doc.rust\-lang.org/cargo/reference/environment\-variables.html" "the reference" " "
132for
133details on environment variables that Cargo reads.
134.SH "EXIT STATUS"
135.sp
1360
137.RS 4
138Cargo succeeded.
139.RE
140.sp
141101
142.RS 4
143Cargo failed to complete.
144.RE
145.SH "EXAMPLES"
146.sp
147.RS 4
148.ie n \{\
149\h'-04' 1.\h'+01'\c
150.\}
151.el \{\
152. sp -1
153. IP " 1." 4.2
154.\}
155Display the path to the manifest based on the current directory:
156.sp
157.if n .RS 4
158.nf
159cargo locate\-project
160.fi
161.if n .RE
162.RE
163.SH "SEE ALSO"
164.sp
165\fBcargo\fP(1), \fBcargo\-metadata\fP(1)