6 releases (breaking)
Uses new Rust 2024
| 0.5.1 | May 28, 2025 |
|---|---|
| 0.5.0 | Feb 25, 2025 |
| 0.4.0 | Oct 26, 2024 |
| 0.3.0 | Oct 13, 2024 |
| 0.1.0 | Sep 27, 2024 |
#381 in Configuration
384 downloads per month
9KB
105 lines
Dotenv+
A dotenv solution for Rust.
Quick Start
Write the environment variables in the env files
and access them later using the var function:
KEY=value
use dotenv_plus::{
DotEnv,
var,
};
DotEnv::new().run();
assert_eq!(var("RUST_ENV"), "production");
assert_eq!(var("KEY"), "value");
# By default, `RUST_ENV` is set to `development`
RUST_ENV=production cargo run
Dotenv+
A dotenv solution for Rust.
Quick Start
Write the environment variables in the env files and access them later using the var function:
KEY=value
use dotenv_plus::{
DotEnv,
var,
};
DotEnv::new().run();
assert_eq!(var("RUST_ENV"), "production");
assert_eq!(var("KEY"), "value");
# By default, `RUST_ENV` is set to `development`
RUST_ENV=production cargo run
License
This project is licensed under the terms of the MIT license.
Dependencies
~48KB