Skip to content

Commit e1530bd

Browse files
authored
docs(guide): Clarify where to set config (#16107)
### What does this PR try to resolve? This was originally written for `[profiles]` but we now document `[build]` and `[target]` which are `.cargo/config.toml` only, so we need to add some more nuance. ### How to test and review this PR?
2 parents 4e0a4cf + c5dba65 commit e1530bd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/doc/src/guide/build-performance.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ Example workflows to consider include:
1313

1414
Cargo uses configuration defaults that try to balance several aspects, including debuggability, runtime performance, build performance, binary size and others. This section describes several approaches for changing these defaults that should be designed to maximize build performance.
1515

16-
You can set the described options either in the [`Cargo.toml` manifest](../reference/profiles.md), which will make them available for all developers who work on the given crate/project, or in the [`config.toml` configuration file](../reference/config.md), where you can apply them only for you or even globally for all your local projects.
16+
Common locations to override defaults are:
17+
- [`Cargo.toml` manifest](../reference/profiles.md)
18+
- Available to all developers contributing to your project
19+
- Limited in what configuration is supported (see [#12738](https://github.com/rust-lang/cargo/issues/12738) for expanding this)
20+
- [`$WORKSPACE_ROOT/.cargo/config.toml` configuration file](../reference/config.md)
21+
- Available to all developers contributing to your project
22+
- Unlike `Cargo.toml`, this is sensitive to what directory you invoke `cargo` from (see [#2930](https://github.com/rust-lang/cargo/issues/2930))
23+
- [`$CARGO_HOME/.cargo/config.toml` configuration file](../reference/config.md)
24+
- For a developer to control the defaults for their development
1725

1826
### Reduce amount of generated debug information
1927

0 commit comments

Comments
 (0)