Closed nathanielc closed 6 months ago
Yes, since base64-url
itself does not actually utilize the std
feature, so I think it should not be a default feature and should be considered for removal in the future.
Ok, I ran into an issue where I could not build my project which depends on base64-url
. The issue was that I was trying to convert an error returned from decode into a dyn StdError. However since I base64-url
does not enable the std
future the decode error returned does not implement the StdError trait.
With cargo there isn't a way to enable features for dependencies of dependencies. To fix the build I had to add base64
as an explicitly dependency and enable the feature directly. See https://github.com/ceramicnetwork/rust-dag-jose/pull/31
Since base64-url
re-exports types from base64
it would be useful to also expose a std
feature that simply enables the std
feature of base64
.
Given your strong recommendation, I will go with it.
Thanks!
See https://github.com/magiclen/base64-url/blob/master/Cargo.toml#L21
Its no longer possible to enable the std feature on the
base64
dependency with a feature on this crate. Is it expected that all consumers ofbase64-url
that want to usebase64/std
must explicitly statebase64
as a dependency?