Support serde w/o std and update base64 dependency #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By using base64’s encode_slice and decode_slice it’s possible to
implement serde serialisation without std or alloc. Take advantage of
that and allow enabling serde support separate from std. This is
gated by a new
serde
feature which.To maintain backwards-compatibility make
std
feature enablesserde
feature. Ideally, it should be possible to enable
std
withoutbringing in serde support. We're still in 0.x releases so there’s
technically no semver issue in breaking builds, but for now it’s
probably nicer to keep
std
enabling serde support. It probablymakes sense to remove that in 0.8.
With all that, make serde and base64 dependencies optional.
Previously, they were always included even though they were only used
if
std
feature was enabled. Now, they are enabled only ifexplicitly requested.
While at it, update base64 dependency to the newest 0.21.2 release.