Cargo structured syntax for feature dependencies on crates
This RFC extends Cargo's structured table form of features to include a deps
key, to unambiguously specify packages the feature depends on without having to
use the dep:foo microformat.
[features]
myfeature = { deps = ["some-crate", "another-crate"] }
# This is equivalent to `myfeature = ["dep:some-crate", "dep:another-crate"]`
# This can also be written in shorthand form:
myfeature.deps = ["some-crate", "another-crate"]
This incremental RFC was inspired by the incremental, easier-to-review RFCs currently being used for other individual pieces of the structured table format for features.
I like this because of previously unmentioned future possibilities: It paves the way to have documentation on features in a more parsable format than what is currently used for the document-features crate, and it could provide machine readable descriptions for the impact on stability of a given feature (when features are used in a way that alters semver guarantees, or increase the MSRV).
[edit: Comment should have been to 3416, sorry for the noise, thanks for the clarification in https://github.com/rust-lang/rfcs/pull/3663#issuecomment-2194671155]
Note that the table syntax is independent of this and its RFC has been merged. There is a description RFC up.
I'm going to close this for now; it sounds like there's a desire for a more thorough and comprehensive handling of the various cases of dependency syntax, rather than an incremental step here.