graze

Rust build status badge Clippy check status badge Rustfmt check status badge
## What is `graze`? `graze` is a zero-boilerplate configuration library. `graze` itself does not use [serde](https://crates.io/crates/serde) as a dependency, but can easily be used alongside the [serde](https://crates.io/crates/serde) ecosystem. ## Functions - `load_from_path` - `load_or_default` - `load_or_write_default` ## Examples ### Load a configuration using the [toml](https://crates.io/crates/toml) crate ```rust use serde::Deserialize; #[derive(Deserialize)] struct Config { message: String } fn main() { let config = graze::load_from_path("Config.toml", |c| toml::from_str(c)) .expect("Could not load configuration"); println!("{}", config.message); } ```