twelf 0.15.0

Twelf is a configuration solution for Rust including 12-Factor support. It is designed with layers in order to configure different sources and formats to build your configuration. The main goal is to be very simple using a proc macro.
Documentation
#![allow(dead_code)]

use twelf::{config, Layer};

#[config]
#[derive(Debug, Default)]
struct Config {
    db_host: String,
    threads: usize,
    #[serde(default = "get_default_value")]
    default_value: String,
}

fn get_default_value() -> String {
    String::from("my default value")
}
fn main() {
    std::env::set_var("DB_HOST", "localhost");
    std::env::set_var("THREADS", "5");
    let config = Config::with_layers(&[Layer::Env(None)]).unwrap();

    println!("config - {:?}", config);
}