#encdec #macro #decoding #encdec-macros

macro encdec-macros

encdec simple encoder/decoder derive macros

15 releases (8 breaking)

0.10.0 Dec 23, 2024
0.9.0 May 10, 2023
0.8.3 Jan 15, 2023
0.8.2 Nov 27, 2022

#1753 in Procedural macros

Download history 151/week @ 2025-01-02 209/week @ 2025-01-09 283/week @ 2025-01-16 227/week @ 2025-01-23 373/week @ 2025-01-30 434/week @ 2025-02-06 647/week @ 2025-02-13 274/week @ 2025-02-20 454/week @ 2025-02-27 608/week @ 2025-03-06 467/week @ 2025-03-13 428/week @ 2025-03-20 1022/week @ 2025-03-27 425/week @ 2025-04-03 787/week @ 2025-04-10 416/week @ 2025-04-17

2,812 downloads per month
Used in 12 crates (via encdec)

MPL-2.0 license

49KB
1K SLoC

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
~61K SLoC