-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplement #[bitcode(with_serde)] #47
Comments
Downside 4: Still in favor of this, though! |
Implementing this would partially-fully resolve these open issues: |
I would like to ask if we use |
The correct choice is made automatically, considering |
There have been many requests for supporting 3rd party crates such as: time, rust_decimal, uuid, and chrono. Rather than implementing support manually for these crates and more, an easier solution is to allow types implementing
serde::Serialize
inside types implementingbitcode::Encode
.This was previously a feature in 0.5, but we didn't reimplement it in the 0.6 rewrite due due to technical limitations. I have since found a path forward and intend to add this feature to 0.6.
The downsides of using serde instead of implementing these types in native bitcode are:
#[bitcode(with_serde)]
annotations on every field where serde is used1 and 2 aren't much of an issue if serde is used infrequently. 3 poses more of an issue, but so far none of the types requested are collections. We could mitigate it by implementing some of the popular collections such as
IndexMap
.The text was updated successfully, but these errors were encountered: