Cargo config search meta issue.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
This is a meta issue to coordinate the different requests for changing how cargo searches for config files. Currently there is very little control over this process, and there are several aspects that can be confusing or surprising.
Instead of incrementally making changes to add additional knobs, the Cargo team would like to see an overall strategy to make it flexible enough to accommodate most of the requested issues while still remaining relatively simple to use and understand. A change like this would likely need to go through the RFC process to flesh out the design and make sure any changes consider the big picture.
Linking issues and PRs:
- Issue #2930 — Cargo does not always search for .cargo/config file in project root
- Issue #7620 -- Cargo loads workspace's .cargo/config when in excluded workspace member
- Issue #6728 — Want env var specifying overriding config file
- Issue #7723 — Tracking issue for config-include
- PR #7894 — Implement CARGO_CONFIG_PATH config file search override
- Issue #7621 — Add flag to ignore all parent directory configs
- Issue #7887 — Fine-grain control of Config.toml discovery
- Issue #8643 — Add a --ignore-local-config flag for ignoring local .cargo/config.toml files
- PR #8652 — Add a unstable --ignore-local-config flag
- Issue #8148 — env var for original invocation directory
- Issue #9306 — Support multiple cargo configuration files in
.cargo/. - https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336
- https://internals.rust-lang.org/t/problems-of-cargo-config-files-and-possible-solutions/12987
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked issues and discussions about .cargo/config, Cargo.toml, configuration discovery, and override flags. Compare the requested behaviors, then use the RFC process to define an overall strategy; done means an agreed design that addresses the listed configuration-search cases without unnecessary complexity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100