Deku
Deku provides bit level serialization/deserialization proc-macro for structs
Under the hood, it uses nom as the consumer or “Reader” and bitvec as the “Writer”
Example
use *;
use ;
/// DekuTest Struct
// 0 1 2 3
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | field_a | field_b |c| field_d |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// #[deku(endian = "little")] // By default it uses the system endianess, but can be overwritten