Registry / config / dotenvy-macro

dotenvy-macro

JSON →
library0.15.7rscratesunverified

A macro for compile-time dotenv inspection.

# Cargo.toml [dependencies] dotenvy_macro = "0.15.7"
INSTALL
IMPORT
SIG · DOTENVY-MACRO
D
dotenvy-macro
configrustv0.15.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dotenv
use dotenvy_macro::dotenv;

Load an environment variable at compile time from a .env file.

use dotenvy_macro::dotenv; fn main() { let value = dotenv!("MY_VAR"); println!("Value: {}", value); }
Debug
Known issues
gotchaThe .env file must be present at compile time; runtime changes are not reflected.
fix
Ensure the .env file is in the project root or set the path explicitly.
affects: >=0.15.0
Upgrade
Version history
0.15.7latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
38
Resources
dotenvy-macro — cargo add dotenvy-macro · libregistry