[Pre-RFC] Proposal: bound Cargo's implicit upward discovery for config.toml files
Rust Internals [Unofficial]
April 30, 2026
I actually tried a bit more: cd /tmp && cargo build --manifest-path=$HOME/some/where/Cargo.toml works, while cargo build --manifest-path="$HOME/some/where/CArgo.toml" fails to build with my broken configuration in $HOME/.cargo/config.toml.
So the work-around you suggested works indeed works for cargo build. Is there a similar work-around for cargo install?
I tired to cargo build first and then do a cargo install as a separate step. Cargo is really thorough: It does not recompile any of the files, but it does notice that the linker has changed and tries to relinking the binary, triggering my broken linker configuration in $HOME/.cargo/config.toml.
Discussion in the ATmosphere