#codec #traits #object #base #binary #encode #encdec

no-std encdec-base

encdec simple encoder/decoder base types and traits

14 releases (7 breaking)

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

#2287 in Rust patterns

Download history 166/week @ 2024-01-04 142/week @ 2024-01-11 159/week @ 2024-01-18 164/week @ 2024-01-25 234/week @ 2024-02-01 216/week @ 2024-02-08 79/week @ 2024-02-15 175/week @ 2024-02-22 113/week @ 2024-02-29 83/week @ 2024-03-07 58/week @ 2024-03-14 165/week @ 2024-03-21 173/week @ 2024-03-28 121/week @ 2024-04-04 113/week @ 2024-04-11 95/week @ 2024-04-18

504 downloads per month
Used in 8 crates (2 directly)

MPL-2.0 license

22KB
509 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:

encdec base traits

Dependencies

~0.7–1MB
~18K SLoC