adotenv-process 0.9.6

Unsafe process-environment adapter for adotenv loaded values.
Documentation

adotenv-process

Explicit process-environment mutation for adotenv loaded environments.

use adotenv::load::load_cascade;
use adotenv_process::apply;

let loaded = load_cascade("/srv/my-app", "production")?;
// The caller must guarantee no concurrent process-environment access.
unsafe { apply(&loaded)? };

apply validates every key and value before the first mutation, sets only the loaded keys and cannot roll changes back. The process environment is global and not thread-safe on all platforms, so the caller owns those guarantees. Reading LoadedEnvironment::values() into an application map remains the safe default.

This is the only crate in the workspace with an unsafe API; the core adotenv crate remains #![forbid(unsafe_code)]. This crate is part of the adotenv workspace and supports Rust 1.81.