zonfig 0.1.0

A small dynamic configuration loader with file watching and hot reload support.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde::Deserialize;

#[derive(Debug, Deserialize)]
struct AppConfig {
    host: String,
    port: u16,
}

fn main() -> Result<(), zonfig::Error> {
    let config: AppConfig = zonfig::load("fixtures/app.toml")?;

    println!("{}:{}", config.host, config.port);
    Ok(())
}