Skip to content

Commit 97ec21d

Browse files
committed
Add configuration changes section
1 parent 5940262 commit 97ec21d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Example workflows to consider include:
99
- Test feedback as you develop (`cargo test` after making a code change)
1010
- CI builds
1111

12-
Note that some approaches described below currently require using the nightly toolchain.
12+
All approaches described below require you to modify [Cargo configuration](#where-to-apply-configuration-changes). Note that some of them currently require using the nightly toolchain.
1313

1414
## Reduce amount of generated debug information
1515

16-
Recommendation: Add to your `Cargo.toml` (for maintainers) or `$CARGO_HOME/.cargo/config.toml` (for contributors):
16+
Recommendation: Add to your `Cargo.toml` or `.cargo/config.toml`:
1717

1818
```toml
1919
[profile.dev]
@@ -60,3 +60,12 @@ codegen-backend = "cranelift"
6060
Since this is currently an unstable option, you will also need to either pass `-Z codegen-backend` to Cargo, or enable this unstable option in the `.cargo/config.toml` file. You can find more information about the unstable `codegen-backend` profile option [here](../reference/unstable.md#codegen-backend).
6161

6262
Note that the Cranelift backend might not support all features used by your crate. It is also available only for a limited set of targets.
63+
64+
65+
## Where to apply configuration changes
66+
67+
You can apply the configuration changes described above in several places:
68+
69+
- If you apply them to the `Cargo.toml` manifest, they will affect all developers who work on the given crate/project.
70+
- If you apply them to the `<workspace>/.cargo/config.toml` file, they will affect only you (unless this file is checked into version control).
71+
- If you apply them to the `$CARGO_HOME/.cargo/config.toml` file, they will be applied globally to all Rust projects that you work on.

0 commit comments

Comments
 (0)