Function dotenv_build::output[][src]

pub fn output(config: Config<'_>) -> Result<(), Error>
Expand description

Outputs the necessary build.rs instructions.

Example

dotenv_build::output(dotenv_build::Config::default()).unwrap();

.env:

RUST_LOG=debug
RUST_BACKTRACE=1

# comment
TEST="hello world!"
ANOTHER_ONE=test

output:

cargo:rustc-env=RUST_LOG=debug
cargo:rustc-env=RUST_BACKTRACE=1
cargo:rustc-env=TEST=hello world!
cargo:rustc-env=ANOTHER_ONE=test
cargo:rerun-if-changed=$PATH_TO_YOUR_FILE/.env