[Pre-RFC] Proposal: bound Cargo's implicit upward discovery for config.toml files
Rust Internals [Unofficial]
April 30, 2026
Partial workaround: If you can have a directory path that is clean from unwanted configs, you can cd to it and use --manifest-path=/elsewhere/Cargo.toml to separate Cargo's config search (relative to cwd) from the location of the crate being built.
Crates invoking cargo from build.rs will unfortunately revert to their own crate's cwd.
Discussion in the ATmosphere