Envconfig
Build a config structure from environment variables in Rust without boilerplate.
Usage
Let's say you application relies on the following environment variables:
DB_HOSTDB_PORT
And you want to initialize Config structure like this one:
You can achieve this with the following code without boilerplate:
extern crate envconfig_derive;
extern crate envconfig;
use Envconfig;
Running tests
Tests do some manipulation with environment variables, so to prevent flaky tests they have to be executed in a single thread:
cargo test -- --test-threads=1
Roadmap
- - migrate to the latest versions of
synandquote - - support
Option<T>(issue) - - support
defaultattribute (issue) - - support nested structures?
License
Contributors
- greyblake Potapov Sergey - creator, maintainer.