16 releases (8 breaking)

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

#2322 in Encoding

Download history 38/week @ 2024-04-07 67/week @ 2024-04-14 29/week @ 2024-04-21 32/week @ 2024-04-28 49/week @ 2024-05-05 36/week @ 2024-05-12 200/week @ 2024-05-19 111/week @ 2024-05-26 154/week @ 2024-06-02 14/week @ 2024-06-09 34/week @ 2024-06-16 30/week @ 2024-06-23 8/week @ 2024-06-30 66/week @ 2024-07-07 48/week @ 2024-07-14 24/week @ 2024-07-21

146 downloads per month
Used in 6 crates (4 directly)

MPL-2.0 license

35KB
563 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

Dependencies

~2.5MB
~57K SLoC