Optional features are part of the crate — the project should say so
Rust Internals [Unofficial]
March 14, 2026
zackw:
What would be so bad about moving everything, and I really do mean everything , from
.cargo/config.tomltoCargo.toml, right now, so that we can deprecate the existence of.cargo/config.tomlin packages and workspaces as soon as possible?
I'd recommend actually looking at the config before making such broad statements
doc.rust-lang.org
Configuration format - Configuration - The Cargo Book
This document explains how Cargo’s configuration system works, as well as available keys or configuration. For configuration of a package through its manifest, see the manifest format.
- alias: there is no manifest lookup for these today
- build: half of these are caller, machine, or user specific
- credential-alias: user specific
- doc: user or machine specific
- env: unenumerable use case
- future-incompat-report: user specific
- cache: user or machine specific
- cargo-new: user as the point is that you aren't in a repo
- http: user or machine specific
- install: caller, user, or machine specific
- net: ditto
- patch: already in manifest
- profile: ditto
- resolver: controlled by
workspace.resolver. Maybe more can go in but design work is needed - registries: unsure
- source: ditto
- target links: overriding build scripts should likely not be in a static file
- term: caller, user, or machine specific
Another problem is RUSTFLAGS is a raw escape hatch that users can shoot themselves in the foot with and so it needs a "here be dragons" rather than having a paved path in the manifest,
Discussion in the ATmosphere