Crates.io | dotenvy-codegen |
lib.rs | dotenvy-codegen |
version | 0.15.1 |
source | src |
created_at | 2022-02-28 19:07:56.423723 |
updated_at | 2022-02-28 19:07:56.423723 |
description | A macro for compile time dotenv inspection |
homepage | https://github.com/allan2/dotenvy |
repository | https://github.com/allan2/dotenvy |
max_upload_size | |
id | 541109 |
size | 2,480 |
A well-maintained fork of the dotenv crate.
This library loads environment variables from a .env file. This is convenient for dev environments.
dotenvy
crate - A well-maintained fork of the dotenv
crate.dotenvy_codegen
crate - A macro for compile time dotenv inspection.dotenvy_codgen_impl
crate - Internal implementation for dotenvy_codegen.dotenvy
CLI tool for running a command using the environment from a .env file (currently Unix only)use dotenvy::dotenv;
use std::env;
fn main() {
dotenv().ok();
for (key, value) in env::vars() {
println!("{key}: {value}");
}
}
The dotenv!
macro provided by dotenvy_codegen
crate can be used.
Warning: there is an outstanding issue with rust-analyzer (rust-analyzer #9606) related to the dotenv!
macro
The original dotenv crate has not been updated since June 26, 2020. Attempts to reach the authors and present maintainer were not successful (dotenv-rs/dotenv #74).
This fork is intended to serve as the development home for the dotenv implementation in Rust.
This repo fixes:
std::env::home_dir
)dotenv!
(dotenv-rs/dotenv #57)For a full list of changes, read the changelog.
Legend has it that the Lost Maintainer will return, merging changes from dotenvy
into dotenv
with such thrust that all Cargo.toml
s will lose one keystroke. Only then shall the Rust dotenv crateverse be united in true harmony.
Until then, this repo dutifully carries on the dotenv torch. It is actively maintained. Contributions and PRs are very welcome!