strict-env Parse config values from environment variables Resources Documentation crates.io TL;DR std::env::set_var("PORT", "9001"); // or e.g. dotenv::dotenv() let port: u16 = strict_env::parse("PORT")?; assert_eq!(port, 9001);