#shim #serde #enum-primitive

no-std enum_primitive_serde_shim

Community Driven Serde Shims

4 releases

Uses old Rust 2015

0.2.3 Jan 1, 2023
0.2.2 Dec 19, 2019
0.2.1 Nov 22, 2018
0.2.0 Nov 22, 2018

#1658 in Encoding

Download history 8/week @ 2024-07-29 30/week @ 2024-08-05 8/week @ 2024-08-12 10/week @ 2024-08-19 27/week @ 2024-08-26 30/week @ 2024-09-02 144/week @ 2024-09-09 49/week @ 2024-09-16 49/week @ 2024-09-23 49/week @ 2024-09-30 47/week @ 2024-10-07 22/week @ 2024-10-14 16/week @ 2024-10-21 54/week @ 2024-10-28 81/week @ 2024-11-04

176 downloads per month
Used in serde_shims

MIT license

7KB
55 lines

serde_shims Build Status

Community Driven Serde Shims

Documentation

Many crates prefer to avoid natively providing Serde integration on the basis it could be unstable in the future, be annoying to maintain, or stifles innovation if there is ever a Serde competitor in the Rust serialization world.

However, keeping track of dozens or hundreds of lines of custom shim functions in my own projects has proven to be as much or more frustrating than if I were to add that functionality to those crates directly. The innability to share code between binaries or libraries is especially painful.

So, as a compromise, I present this crate as a way to provide serialize_with/deserialize_with functions or implementation macros for crates without native Serde implementations.

To enable these shims, simply add the crate to your Cargo.toml:

[dependencies]
bitflags_serde_shim = "0.2"
enum_primitive_serde_shim = "0.2"
mime_serde_shim = "0.2"
std_serde_shims = "0.2"

or as a legacy feature-based import with the meta crate:

[dependencies]
serde_shims = { version = "0.2", features = ["std", "mime"] }

If there is a crate you'd like to have a Serde shim for, or would like to contribute your own, feel free to open an issue or pull request!

Dependencies

~345–580KB
~11K SLoC