Add --all-features
to cargo add
#13936
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-add
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
Sometimes, I want to add a crate and blindly enable all the features. For example, Nix puts almost all the interfaces behind at least 1 feature gate, to use an interface, one has to enable the corresponding feature, which is good for reducing the compilation time.
But there are cases where I don't want to bother with that, it is a pain to open the doc, and figure out the feature name used by the interface I want to use and enable it.
If
cargo add
has a--all-features
flag, then I can just enable all the features with it.Proposed Solution
If would be nice if
--all-features
could be supported bycargo add
, i.e., add the dependencies and enable all their features.One alternative way to solve the issue is to provide a
full
feature in Nix, like tokio does, so that I can:Notes
No response
The text was updated successfully, but these errors were encountered: