globenv 0.2.1

Globally set & read environment variables and paths on Windows, macOS or Linux
Documentation
  • Coverage
  • 63.64%
    7 out of 11 items documented1 out of 8 items with examples
  • Size
  • Source code size: 26.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.88 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • DervexDev/globenv
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • DervexDev

globenv

Globally set & read environment variables and paths (not just for the current process) on Windows, macOS or Linux

Example:

use globenv::*;

// Get environment variable
get_var("key").unwrap().unwrap();
// Set environment variable
set_var("key", "value").unwrap();
// Remove environment variable
remove_var("key").unwrap();

// Get all environment paths
get_paths().unwrap();
// Set environment path
set_path("example/path").unwrap();
// Remove environment path
remove_path("example/path").unwrap();

Credit:

Based on the globalenv by @nicolasbauw