{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibw5euo52jzkklwmkqflxjek7dyjy2sp6pl3tbvw4g2kffruva6du",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mkpxvdja73t2"
},
"path": "/t/pre-rfc-proposal-bound-cargos-implicit-upward-discovery-for-config-toml-files/24210#post_7",
"publishedAt": "2026-04-30T13:56:16.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "The problem is that most sources will be somewhere in `$HOME`: That is typically the one place users are allowed to place persistent files. So `$HOME/.cargo/config.toml` will be picked up by walking upward from the project's `Cargo.toml`. This is the case even when setting `$CARGO_HOME` to point somewhere else and of the current working directory.\n\nThis is typically great way for a user to override settings she wants applied to all her projects. But it is a real problem when you want a reproducible way to build the exact same configuration across different machines.\n\nWe can not place files outside the source directory we are trying to build: That is not \"our\" directory anymore, and no tool should litter in unexpected places. Having some environment variable would be the most convenient for our use case.\n\nI might have misunderstood what you meant though:\n\nI tired\n\n`cd /tmp && cargo install --path=\"$HOME/some/where\" --root=\"...\"`\n\n... and get a build failure due to config options I set in my ~/.cargo/config.toml.\n\nCargo install does not accept `--manifest-path`, so maybe I am doing something wrong?",
"title": "[Pre-RFC] Proposal: bound Cargo's implicit upward discovery for config.toml files"
}