#embedded-io #cbor #async #minicbor

no-std minicbor-embedded-io

Async reader and writer types for minicbor

4 releases (breaking)

new 0.4.0 Dec 16, 2024
0.3.0 Apr 24, 2024
0.2.0 Jan 9, 2024
0.1.0 Oct 16, 2023

#1552 in Embedded development

Download history 1/week @ 2024-09-17 10/week @ 2024-09-24 8/week @ 2024-10-01

216 downloads per month

MIT/Apache

27KB
610 lines

Async CBOR Reader and Writer

CI crates.io docs.rs

The minicbor-embedded-io crate implements async read and write for the minicbor crate on top of the embedded-io-async Read and Write traits.

The library is inspired by the way the Dahomey.Cbor library does asynchronous read and write. For example, to read an array, one must implement the CborArrayReader trait, which is called for each array item. The callback can either actually read the item, or return an error indicating that it needs more bytes to fully decode - in this case the reader will be called again whenever more bytes become available.

Dependencies

~1MB
~16K SLoC