Description
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 typical ls
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.