Envconfig
An easy way to build a config structure form environment variables in Rust.
Usage
Let's say you application relies on the following environment variables:
DB_HOST
DB_PORT
And you want to initialize Config
structure like this one:
You can achieve this with the following code without boilerplate:
extern crate envconfig;
envconfig!;
let config = init_or_die;
Running tests
To prevent flaky tests run them in one thread:
cargo test -- --test-threads=1