16 releases (8 breaking)

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

#2098 in Encoding

Download history 48/week @ 2024-07-19 57/week @ 2024-07-26 101/week @ 2024-08-02 143/week @ 2024-08-09 209/week @ 2024-08-16 279/week @ 2024-08-23 360/week @ 2024-08-30 462/week @ 2024-09-06 288/week @ 2024-09-13 260/week @ 2024-09-20 144/week @ 2024-09-27 157/week @ 2024-10-04 101/week @ 2024-10-11 102/week @ 2024-10-18 175/week @ 2024-10-25 403/week @ 2024-11-01

815 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
~59K SLoC