#serialization #serde #data #encoding #binary

macro bakery-derive

Recipe derive macro for bakery library

1 unstable release

0.1.0 Oct 24, 2021

#162 in #data

26 downloads per month
Used in bakery

MIT/Apache

4KB
57 lines

Bakery

Test Status Crate API

A Rust library to deserialize binary objects from structured text data files.

Basic example

use bakery::load_from_string;
use bakery_derive::Recipe;
use serde::Deserialize;

#[derive(Recipe, Deserialize)]
struct GameConfig {
    width: u32,
    height: u32,
    fullscreen: bool
}

let config: GameConfig = load_from_string("width: 1024, height: 768, fullscreen: true");

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~240–650KB
~16K SLoC