environment

Environment variables with std::env for configuration

Reading environment variables is a common way to configure applications. std::env::var("KEY") returns Result<String, VarError>, which you handle with ? or .unwrap_or_else(). I use env vars for secrets, runtime config, and feature flags. For pars