Registry / config / envy
library0.4.2rscratesunverified

Deserializes environment variables into strongly-typed Rust structs.

# Cargo.toml [dependencies] envy = "0.4.2"
INSTALL
IMPORT
SIG · ENVY
E
envy
configrustv0.4.2
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.

from_env
use envy::from_env;

Deserializes environment variables into a Config struct.

use serde::Deserialize; #[derive(Deserialize)] struct Config { host: String, port: u16, } let config: Config = envy::from_env().unwrap();
Debug
Known issues
gotchaRequires the `serde` derive feature for struct deserialization
fix
Add serde = { version = "1", features = ["derive"] } to Cargo.toml
affects: *
Upgrade
Version history
0.4.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
34
Resources
envy — cargo add envy · libregistry