rules_rust
rules_rust copied to clipboard
`crate.annotate` has no way to remove optional features like `crate.override` did
In the previous crates_universe
functionality, crate.override
could be used to remove optional features. There doesn't seem to be any similar functionality in the corresponding crate.annotate
feature now that rules_rust has switched to crates_repository
. This might be useful for turning off some default features, for example. See #1168 for more context.
Note that this is not strictly necessary, as the same problem can be solved by using default_features = False
in the crate.spec
, along with any desired features in the features
field.
What do folks think of allowing negative patterns in crate.annotations.crate_features? This way features auto-included could be removed via ["-feature"]
.
cc @illicitonion
https://doc.rust-lang.org/cargo/reference/features.html#the-features-section documents that features may not start with -
, so that sounds good!