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!

```rust use serbia::serbia;

[serbia]

[derive(Serialize, Deserialize)]

struct S { arra: [u8; 300], arrb: [u8; 42], arr_small: [u8; 8], }

[serbia]

[derive(Serialize, Deserialize)]

enum E { ArrBig([u8; 300]), ArrSmall([u8; 22]), Mixed([u8; 8], [i32; 44], String), } ```