Cargo should support configuration in non-hidden files. #8244
Labels
A-configuration
Area: cargo config files and env vars
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-needs-team-input
Status: Needs input from team on whether/how to proceed.
Describe the problem you are trying to solve
Currently, cargo searches for configuration files by looking for a directory named
.cargo
, which is a hidden directory. This means that a typicalls
invocation does not reveal the existence of a config file. This makes it difficult to debug problems caused by cargo config files, particularly for contributors who are new to a project.Describe the solution you'd like
I would like Cargo to search for a config file in a non-hidden location, such as
cargo/config
. This way projects that want to use Cargo configs and make that config visible can do so.Alternative idea in case searching in a new location is considered a breaking change: We could add a field to
Cargo.toml
pointing to the Cargo config to use when invoked from within a particular crate or workspace.Notes
The Tock project uses Makefiles to pass flags to rustc and the linker rather than using a cargo config because they do not want to have any configs in hidden files.
The text was updated successfully, but these errors were encountered: