ed is a minimalist crate for deterministic binary encodings.
It provides Encode and Decode traits which can be implemented for any
type that can be converted to or from bytes, and implements these traits for
many built-in Rust types. It also provides derive macros so that Encode
and Decode can be easily derived for structs.
ed is far simpler than serde because it does not attempt to create an
abstraction which allows arbitrary kinds of encoding (JSON, MessagePack,
etc.), and instead forces encodings to be decided on by the top-level type
author. It is also significantly faster.
This crate has a focus on determinism (important for cryptographically
hashed types) - so encodings are always big-endian and do not support
floating point numbers or usize.