3 releases (stable)
new 1.0.1 | Jan 13, 2025 |
---|---|
0.0.0 | Jan 13, 2025 |
#127 in Configuration
672 downloads per month
Used in 7 crates
5KB
env
Provides a safe interface for std::env::{set_var, remove_var}
.
Rationale
Since #124636, std::env::set_var
and std::env::remove_var}
have become unsafe, due to their being unsafe when in a multi-threaded unix context^1.
This crate wraps these functions, adding runtime checks to ensure thread safety on unix systems, making them safe again.
lib.rs
:
Inspection and manipulation of the process's environment.
This module contains functions to inspect various aspects such as environment variables, process arguments, the current directory, and various other important directories.
There are several functions and structs in this module that have a
counterpart ending in os
. Those ending in os
will return an OsString
and those without will return a String
.
This crate provides [mod@std::env]::{[set_var], [remove_var]}
safely.
Dependencies
~14KB