| Crates.io | dotenv_plus |
| lib.rs | dotenv_plus |
| version | 0.5.1 |
| created_at | 2024-09-27 10:02:41.265277+00 |
| updated_at | 2025-05-28 11:05:35.840177+00 |
| description | A dotenv solution for Rust |
| homepage | https://github.com/alpheusday/dotenv_plus.rs |
| repository | https://github.com/alpheusday/dotenv_plus.rs |
| max_upload_size | |
| id | 1388527 |
| size | 8,960 |
A dotenv solution for Rust.
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
This project is licensed under the terms of the MIT license.