cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Please change this 🫠🫠🫠

Open CorgiMasterEpic opened this issue 1 year ago β€’ 4 comments

Please Combine .cargo/config.toml and Cargo.toml 🫠

Every time I mix these up, and it’s making me go crazy! 🫠🫠🫠

Right now:

  • Cargo.toml holds package metadata, dependencies, and profiles.
  • .cargo/config.toml holds build configuration, targets, and toolchain settings.

I constantly forget which one I’m supposed to edit, they both look similar, both use TOML, and both control how the project builds, and both start with C.

Suggestion

Please consider merging them (or at least making it clearer which one does what).
Even a small improvement β€” like a unified file or clearer naming β€” would save a ton of developer confusion.

Thanks for keeping Rust awesome! πŸ„πŸ„β€πŸŸ«πŸ„

πŸ¦€

Ferris says hi!

CorgiMasterEpic avatar Nov 13 '25 02:11 CorgiMasterEpic

@rustbot transfer cargo

jieyouxu avatar Nov 13 '25 03:11 jieyouxu

@rustbot label: +S-triage

jieyouxu avatar Nov 13 '25 03:11 jieyouxu

We have https://github.com/rust-lang/cargo/issues/12738 that tracks moving some project-specific configuration to Cargo.toml, and https://github.com/rust-lang/cargo/issues/12739 for rustflags specific discussion. There are also some dicussions in the internal forum: https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336.

Close this in favor of those. If there is a reason this should keep open separately, let us know!

weihanglo avatar Nov 13 '25 04:11 weihanglo

I constantly forget which one I’m supposed to edit, they both look similar, both use TOML, and both control how the project builds, and both start with C.

If you do have more input on this, helping us know what kind of mixups you make would be a big help. For instance, Cargo.toml should have "unused manifest key" warnings which should help some though we could make some more specific about suggesting putting them in the other file. We have nothing like that for .cargo/config.toml but I suspect that is less likely for people to put content into unexpectedly.

epage avatar Nov 13 '25 15:11 epage