serbia 0.1.1

No-fuss big arrays for Serde
Documentation

serbia

docs.rs badge crates.io badge Build Status

Serde big arrays. An attribute macro to make (de)serializing big arrays painless, following a design proposed by dtolnay.

Why?

I saw the idea in request-for-implementation. Then I came up with the name.

The name was too good. I had to do it. Don't judge me.

Also: Serbia has some tasty food.

Status

Under development, but functional. Let me know what's missing!

Usage

Just slap #[serbia] on top of your type definition. Structs and enums both work!

use serbia::serbia;

#[serbia]
#[derive(Serialize, Deserialize)]
struct S {
    arr_a: [u8; 300],
    arr_b: [u8; 42],
    arr_small: [u8; 8],
}

#[serbia]
#[derive(Serialize, Deserialize)]
enum E {
    ArrBig([u8; 300]),
    ArrSmall([u8; 22]),
    Mixed([u8; 8], [i32; 44], String),
}