# Cargo project config unification

**URL:** <https://internals.rust-lang.org/t/cargo-project-config-unification/24082>\
**Category:** cargo\
**Created:** [March 13, 2026, 1:19pm UTC](https://internals.rust-lang.org/t/cargo-project-config-unification/24082 "2026-03-13T13:19:52Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![zackw](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/zackw/32/2071_2.png) [@zackw](https://internals.rust-lang.org/u/zackw)\
**Post date:** [March 14, 2026, 11:37pm UTC](https://internals.rust-lang.org/t/cargo-project-config-unification/24082/5 "2026-03-14T23:37:54Z")

</div>

I understand you to be saying that there are a bunch of existing `.cargo/config.toml` parameters that are problematic to set in the context of a workspace or package, and you (the Cargo team) don't want to be seen as endorsing their use in that context, by making them usable from `Cargo.toml`. Is that an accurate summary of what you're trying to communicate?

Assuming so, first, let me explain in somewhat more detail where I'm coming from. What I care about is getting to a place where no project ever _needs_ to ship a `.cargo/config.toml` in their source tree, as expeditiously as possible. Right now, sometimes people have to do that; for example, I know of software that _has_ to be built with `-C target-feature=+crt-static -C relocation-model=static` or it won't link. The only way to accomplish that, as of the last time the project I'm thinking of was updated,\[1\] was to set `rustflags` in `.cargo/config.toml`.

But it's _bad_ that people have to do that, and I hope you agree with that at least in principle. Many developers don't even know you _can_ put a `.cargo/config.toml` in a workspace or package, and so it's a potential source of confusion for people new to a project. It might even be a place where someone could hide underhanded tricks, in the style of the `xz` exploit. Both these issues are made worse by `.cargo/config.toml` being a hidden file.

Furthermore, it seems to me that any setting that would be problematic in a `Cargo.toml` is equally problematic in a workspace or package `.cargo/config.toml`, only, because it's much less visible in `.cargo/config.toml`, the problems are exacerbated. That's why I can't get behind your plan to sort out the problems and _then_ only move the settings that aren't problematic. I think a world in which all those problematic settings _can_ appear in `Cargo.toml`, but Cargo throws deprecation warnings on the mere existence of package- or workspace-scope `.cargo/config.toml`, is strictly better than the world we have now. I also think that doing the file-level deprecation _first_ and then going back to the problematic settings case by case is a better overall strategy for getting the whole job done in a reasonable amount of time.

* * *

1. it's been on ice for a bit more than a year, so the situation may well have changed

---

_[View the full topic](https://internals.rust-lang.org/t/cargo-project-config-unification/24082)._
