#data-encoding #binary #data #serde #serialization #macro-derive

macro bakery-derive

Recipe derive macro for bakery library

1 unstable release

0.1.0 Oct 24, 2021

#105 in #data-encoding


Used in bakery

MIT/Apache

5KB
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

~1.5MB
~36K SLoC