Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dervexdev/globenv
Globally set & read environment variables and paths on Windows, macOS or Linux
https://github.com/dervexdev/globenv
environment global path rust variable
Last synced: about 1 month ago
JSON representation
Globally set & read environment variables and paths on Windows, macOS or Linux
- Host: GitHub
- URL: https://github.com/dervexdev/globenv
- Owner: DervexDev
- License: apache-2.0
- Created: 2023-10-14T12:51:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-01T12:31:09.000Z (11 months ago)
- Last Synced: 2024-11-02T02:34:48.302Z (about 2 months ago)
- Topics: environment, global, path, rust, variable
- Language: Rust
- Homepage: https://crates.io/crates/globenv
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# globenv
Globally set & read environment variables and paths (not just for the current process) on Windows, macOS or Linux
## Example:
```rust
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](https://github.com/nicolasbauw/globalenv) by [@nicolasbauw](https://github.com/nicolasbauw)