deser: an experimental serialization and deserialization library for Rust

Crates.io License Documentation

Deser is an experimental serialization system for Rust. It wants to explore the possibilities of serialization and deserialization of structural formats such as JSON or msgpack. It intentionally does not desire to support non self describing formats such as bincode.

This is not a production ready yet.

```rust use deser::{Serialize, Deserialize};

[derive(Debug, Serialize, Deserialize)]

[deser(rename_all = "camelCase")]

pub struct Account { id: usize, accountholder: String, isdeactivated: bool, } ```

This generates out the necessary Serialize and Deserialize implementations.

To see some practical examples of this have a look at the examples.

Design Goals

Future Plans

Crates

Inspiration

This crate heavily borrows from miniserde, serde and Sentry Relay's meta system. The general trait design was modelled after miniserde.

In particular for the relationship to Serde there is a Serde Learnings document providing more details.

Safety

Deser (currently) uses excessive amounts of unsafe code internally. It is not vetted and it is likely completely wrong. If this design turns out to be useful there will be need to be a re-design of the internals.

License and Links