env

Crates.ioenv
lib.rsenv
version1.0.1
sourcesrc
created_at2025-01-13 07:36:51.83822
updated_at2025-01-13 08:14:12.279087
descriptionstd::env::{set_var, remove_var} safely
homepage
repositoryhttps://github.com/bend-n/env
max_upload_size
id1514328
size4,993
bendn (bend-n)

documentation

README

env

rust 2024

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 context1.

This crate wraps these functions, adding runtime checks to ensure thread safety on unix systems, making them safe again.

Footnotes

  1. https://github.com/rust-lang/rust/issues/27970

Commit count: 2

cargo fmt