16 releases (8 breaking)

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

#2103 in Encoding

Download history 66/week @ 2023-12-17 62/week @ 2023-12-24 37/week @ 2023-12-31 113/week @ 2024-01-07 91/week @ 2024-01-14 40/week @ 2024-01-21 79/week @ 2024-01-28 171/week @ 2024-02-04 88/week @ 2024-02-11 59/week @ 2024-02-18 74/week @ 2024-02-25 56/week @ 2024-03-03 34/week @ 2024-03-10 96/week @ 2024-03-17 24/week @ 2024-03-24 357/week @ 2024-03-31

513 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
~55K SLoC