I’m considering using versioned crate features. For example, for the crate to enable serde support, it would have a crate feature named “serde-1” for that which corresponds to a dependency on serde 1.0.
- Break the namespace pun. The crate feature is separate from the optional dependency.
- This makes it possible to change what dependencies the feature maps to
- Version the crate flag
- This makes it possible to support both serde-1 and the hypothetical serde-2 at the same time (if there is some way to disambiguate the dependency, and there is)
Maybe you think this doesn’t matter anymore. This is what I wish I had done during the pre-1.0 evolution of serde, so it would be applying a conclusion from the pre-1.0 time to the 1.0 reality. I still don’t see why not to do this.