Store configuration in the project under `.cargo/config.toml`.

Section: Cargo config

Create project-local Cargo config

toml
toml
[build]
target-dir = "target-fast"

[term]
verbose = true
Explanation

Cargo supports configuration files and many keys under `.cargo/config.toml`.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Cargo config
Override config on one command
Pass a config key or file path at runtime.
OpenIn sheetbashsame section
Set target dir by environment variable
Redirect build artifacts without editing config files.
OpenIn sheetbashsame section
Enable Cargo debug logging
Emit tracing logs from Cargo itself.
OpenIn sheetbash1 tag match
Build documentation
Generate docs for the package and dependencies.
OpenIn sheetbash1 tag match
Show the dependency tree
Inspect the dependency graph for the package.
OpenIn sheetbash1 tag match
Change Cargo home
Use a non-default cache and install location.
OpenIn sheetbash1 tag match