14 releases (7 breaking)

0.9.0 May 10, 2023
0.8.3 Jan 15, 2023
0.8.2 Nov 27, 2022

#252 in #encode

Download history 139/week @ 2023-12-11 74/week @ 2023-12-18 60/week @ 2023-12-25 43/week @ 2024-01-01 115/week @ 2024-01-08 96/week @ 2024-01-15 66/week @ 2024-01-22 70/week @ 2024-01-29 160/week @ 2024-02-05 92/week @ 2024-02-12 55/week @ 2024-02-19 52/week @ 2024-02-26 65/week @ 2024-03-04 27/week @ 2024-03-11 96/week @ 2024-03-18 45/week @ 2024-03-25

238 downloads per month
Used in 7 crates (via encdec)

MPL-2.0 license

42KB
886 lines

encdec

This crate provides common (and no_std compatible) Encode and Decode traits for describing binary encode/decode-able objects in embedded contexts, as well as derive macros to automagically implement these over objects, and basic (at this time little-endian only) implementations for primitive types.

This is intended for use where you need to binary encode objects to suit a particular protocol or specification, because who hasn't had enough of creating per-project encoding traits, and for everything else there are neater solutions like prost for protobufs or serde and postcard if all consumers are using rust.

Status

GitHub tag Build Status Crates.io Docs.rs


lib.rs:

Macros for deriving Decode and Encode

Dependencies

~2.5MB
~56K SLoC