#config #configuration #environment #application

strict-env

Parse config values from environment variables

3 releases

0.1.2 Apr 16, 2021
0.1.1 Apr 14, 2021
0.1.0 Apr 13, 2021

#21 in #application

45 downloads per month

MIT license

16KB
313 lines

strict-env

Parse config values from environment variables

Documentation Build status Test coverage
crates.io Downloads Rust version
MIT license

Resources

TL;DR

std::env::set_var("PORT", "9001"); // or e.g. dotenv::dotenv()
let port: u16 = strict_env::parse("PORT")?;
assert_eq!(port, 9001);

Dependencies

~260–680KB
~17K SLoC