// readme

Seabored

Description

Implementation of the CBOR data format. Serde bridge and native derive (optional).

Compatible with WASM.

Complies to the following RFCs:

Documentation

Here: https://docs.rs/seabored

Not great as of now, will get better in subsequent releases. If you want examples, please head to the benches folder.

Native derive

With the derive feature, the native traits can be derived without going through Serde. Attributes are under #[cbor(...)].

use seabored::de::from_bytes;
use seabored::ser::CborSerialize;

#[derive(Debug, PartialEq, seabored::CborSerialize, seabored::CborDeserialize)]
struct Record {
    id: u32,
    #[cbor(key = "payload", tag = 24)]
    payload: Vec<u8>,
    #[cbor(skip, default)]
    cache: u64,
}

let bytes = Record { id: 1, payload: vec![1, 2],โ€ฆ