confroid 0.0.1

The n+1-st config reader for your environment-based configs.
Documentation

confroid

Your config on 'roids — a small, type-driven reader for environment-based configuration.

Derive [Config] on a struct and read it with [from_env]:

# use confroid as confroid;
#[derive(confroid::Config)]
struct Config {
    #[confroid(default = 8080)]
    port: u16,
}

// Reads the `PORT` environment variable, falling back to 8080.
let config: Config = confroid::from_env().unwrap();
# let _ = config.port;