Registry / utility / default-env

default-env

JSON →
library0.1.1rscratesunverified

The `env!` macro but with a default value.

# Cargo.toml [dependencies] default-env = "0.1.1"
INSTALL
IMPORT
SIG · DEFAULT-ENV
D
default-env
utilityrustv0.1.1
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.

default_env
✓ use default_env::default_env;

Reads an environment variable at compile time with a fallback default.

use default_env::default_env; fn main() { let value = default_env!("MY_VAR", "default_value"); println!("Value: {}", value); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
default-env — cargo add default-env · libregistry