const-dotenvy 0.1.0

A proc-macro to load .env variables at compile time using dotenvy
Documentation

const-dotenvy

Crates.io: const-dotenvy Documentation

A rust crate to read environment variables at compile-time and embed them into the code.

For example:

let (host, port, use_tls): (&'static str, u16, bool) = const_dotenvy::dotenvy!(
    HOST: &'static str,
    PORT: u16 = 8080,
    USE_TLS: bool = false
);

will become

let (host, port, use_tls): (&'static str, u16, bool) = ("localhost", 8080, false);

It uses dotenvy crate to read the environment file located in the source folder at compile-time, then expands to the read value.