Skip to content

Commit 25409e5

Browse files
committed
Update documentation to mention "config.toml" and "credentials.toml" instead of "config" and "credentials"
Cargo now support loading 'config.toml' and 'credentials.toml' in place of the same files without extension, which used to be the default. Files with extensions are easier for people to edit due to syntax highlighting, etc.
1 parent 2cb9243 commit 25409e5

18 files changed

+53
-53
lines changed

src/doc/man/cargo-login.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cargo-login - Save an API token from the registry locally
1414

1515
This command will save the API token to disk so that commands that require
1616
authentication, such as man:cargo-publish[1], will be automatically
17-
authenticated. The token is saved in `$CARGO_HOME/credentials`. `CARGO_HOME`
17+
authenticated. The token is saved in `$CARGO_HOME/credentials.toml`. `CARGO_HOME`
1818
defaults to `.cargo` in your home directory.
1919

2020
If the _TOKEN_ argument is not specified, it will be read from stdin.

src/doc/man/cargo-vendor.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies specified. Additional manifests beyond the default one can be
1919
specified with the `-s` option.
2020

2121
The `cargo vendor` command will also print out the configuration necessary
22-
to use the vendored sources, which you will need to add to `.cargo/config`.
22+
to use the vendored sources, which you will need to add to `.cargo/config.toml`.
2323

2424
== OPTIONS
2525

@@ -35,7 +35,7 @@ to use the vendored sources, which you will need to add to `.cargo/config`.
3535
existing contents of the vendor directory
3636

3737
*--respect-source-config*::
38-
Instead of ignoring `[source]` configuration by default in `.cargo/config`
38+
Instead of ignoring `[source]` configuration by default in `.cargo/config.toml`
3939
read it and use it when downloading crates from crates.io, for example
4040

4141
*--versioned-dirs*::

src/doc/man/cargo.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ include::section-exit-status.adoc[]
169169
Binaries installed by man:cargo-install[1] will be located here. If using
170170
rustup, executables distributed with Rust are also located here.
171171

172-
`$CARGO_HOME/config`::
172+
`$CARGO_HOME/config.toml`::
173173
The global configuration file. See linkcargo:reference/config.html[the reference]
174174
for more information about configuration files.
175175

176-
`.cargo/config`::
177-
Cargo automatically searches for a file named `.cargo/config` in the
176+
`.cargo/config.toml`::
177+
Cargo automatically searches for a file named `.cargo/config.toml` in the
178178
current directory, and all parent directories. These configuration files
179179
will be merged with the global configuration file.
180180

181-
`$CARGO_HOME/credentials`::
181+
`$CARGO_HOME/credentials.toml`::
182182
Private authentication information for logging in to a registry.
183183

184184
`$CARGO_HOME/registry/`::

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h2 id="cargo_login_description">DESCRIPTION</h2>
1616
<div class="paragraph">
1717
<p>This command will save the API token to disk so that commands that require
1818
authentication, such as <a href="cargo-publish.html">cargo-publish(1)</a>, will be automatically
19-
authenticated. The token is saved in <code>$CARGO_HOME/credentials</code>. <code>CARGO_HOME</code>
19+
authenticated. The token is saved in <code>$CARGO_HOME/credentials.toml</code>. <code>CARGO_HOME</code>
2020
defaults to <code>.cargo</code> in your home directory.</p>
2121
</div>
2222
<div class="paragraph">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2 id="cargo_vendor_description">DESCRIPTION</h2>
2222
</div>
2323
<div class="paragraph">
2424
<p>The <code>cargo vendor</code> command will also print out the configuration necessary
25-
to use the vendored sources, which you will need to add to <code>.cargo/config</code>.</p>
25+
to use the vendored sources, which you will need to add to <code>.cargo/config.toml</code>.</p>
2626
</div>
2727
</div>
2828
</div>
@@ -46,7 +46,7 @@ <h3 id="cargo_vendor_vendor_options">Vendor Options</h3>
4646
</dd>
4747
<dt class="hdlist1"><strong>--respect-source-config</strong></dt>
4848
<dd>
49-
<p>Instead of ignoring <code>[source]</code> configuration by default in <code>.cargo/config</code>
49+
<p>Instead of ignoring <code>[source]</code> configuration by default in <code>.cargo/config.toml</code>
5050
read it and use it when downloading crates from crates.io, for example</p>
5151
</dd>
5252
<dt class="hdlist1"><strong>--versioned-dirs</strong></dt>

src/doc/man/generated/cargo.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,18 +354,18 @@ <h2 id="_files">FILES</h2>
354354
<p>Binaries installed by <a href="cargo-install.html">cargo-install(1)</a> will be located here. If using
355355
rustup, executables distributed with Rust are also located here.</p>
356356
</dd>
357-
<dt class="hdlist1"><code>$CARGO_HOME/config</code></dt>
357+
<dt class="hdlist1"><code>$CARGO_HOME/config.toml</code></dt>
358358
<dd>
359359
<p>The global configuration file. See <a href="../reference/config.html">the reference</a>
360360
for more information about configuration files.</p>
361361
</dd>
362-
<dt class="hdlist1"><code>.cargo/config</code></dt>
362+
<dt class="hdlist1"><code>.cargo/config.toml</code></dt>
363363
<dd>
364-
<p>Cargo automatically searches for a file named <code>.cargo/config</code> in the
364+
<p>Cargo automatically searches for a file named <code>.cargo/config.toml</code> in the
365365
current directory, and all parent directories. These configuration files
366366
will be merged with the global configuration file.</p>
367367
</dd>
368-
<dt class="hdlist1"><code>$CARGO_HOME/credentials</code></dt>
368+
<dt class="hdlist1"><code>$CARGO_HOME/credentials.toml</code></dt>
369369
<dd>
370370
<p>Private authentication information for logging in to a registry.</p>
371371
</dd>

src/doc/src/guide/cargo-home.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ The Cargo home consists of following components:
1212

1313
## Files:
1414

15-
* `config`
15+
* `config.toml`
1616
Cargo's global configuration file, see the [config entry in the reference][config].
1717

18-
* `credentials`
18+
* `credentials.toml`
1919
Private login credentials from [`cargo login`] in order to log in to a registry.
2020

2121
* `.crates.toml`

src/doc/src/reference/config.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ all parent directories. If, for example, Cargo were invoked in
1212
`/projects/foo/bar/baz`, then the following configuration files would be
1313
probed for and unified in this order:
1414

15-
* `/projects/foo/bar/baz/.cargo/config`
16-
* `/projects/foo/bar/.cargo/config`
17-
* `/projects/foo/.cargo/config`
18-
* `/projects/.cargo/config`
19-
* `/.cargo/config`
20-
* `$CARGO_HOME/config` which defaults to:
21-
* Windows: `%USERPROFILE%\.cargo\config`
22-
* Unix: `$HOME/.cargo/config`
15+
* `/projects/foo/bar/baz/.cargo/config.toml`
16+
* `/projects/foo/bar/.cargo/config.toml`
17+
* `/projects/foo/.cargo/config.toml`
18+
* `/projects/.cargo/config.toml`
19+
* `/.cargo/config.toml`
20+
* `$CARGO_HOME/config.toml` which defaults to:
21+
* Windows: `%USERPROFILE%\.cargo\config.toml`
22+
* Unix: `$HOME/.cargo/config.toml`
2323

2424
With this structure, you can specify configuration per-package, and even
2525
possibly check it into version control. You can also specify personal defaults
@@ -179,15 +179,15 @@ relative to the current working directory.
179179
runner = "foo" # Searches `PATH` for `foo`.
180180

181181
[source.vendored-sources]
182-
# Directory is relative to the parent where `.cargo/config` is located.
183-
# For example, `/my/project/.cargo/config` would result in `/my/project/vendor`.
182+
# Directory is relative to the parent where `.cargo/config.toml` is located.
183+
# For example, `/my/project/.cargo/config.toml` would result in `/my/project/vendor`.
184184
directory = "vendor"
185185
```
186186

187187
### Credentials
188188

189189
Configuration values with sensitive information are stored in the
190-
`$CARGO_HOME/credentials` file. This file is automatically created and updated
190+
`$CARGO_HOME/credentials.toml` file. This file is automatically created and updated
191191
by [`cargo login`]. It follows the same format as Cargo config files.
192192

193193
```toml

src/doc/src/reference/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ let out_dir = env::var("OUT_DIR").unwrap();
294294
use it as well.
295295
* `RUSTC_LINKER` — The path to the linker binary that Cargo has resolved to use
296296
for the current target, if specified. The linker can be
297-
changed by editing `.cargo/config`; see the documentation
297+
changed by editing `.cargo/config.toml`; see the documentation
298298
about [cargo configuration][cargo-config] for more
299299
information.
300300

src/doc/src/reference/overriding-dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ to modify `Cargo.toml` like with the `[patch]` section above. For this use
318318
case Cargo offers a much more limited version of overrides called **path
319319
overrides**.
320320

321-
Path overrides are specified through [`.cargo/config`](config.md) instead of
322-
`Cargo.toml`. Inside of `.cargo/config` you'll specify a key called `paths`:
321+
Path overrides are specified through [`.cargo/config.toml`](config.md) instead of
322+
`Cargo.toml`. Inside of `.cargo/config.toml` you'll specify a key called `paths`:
323323

324324
```toml
325325
paths = ["/path/to/uuid"]

0 commit comments

Comments
 (0)