| Crates.io | env-inventory |
| lib.rs | env-inventory |
| version | 0.2.4 |
| created_at | 2023-09-20 03:07:35.190713+00 |
| updated_at | 2025-05-09 03:14:59.050505+00 |
| description | A simple library to load globally available environment variables into a static inventory. |
| homepage | |
| repository | https://github.com/safai-labs/env-inventory.git |
| max_upload_size | |
| id | 977766 |
| size | 47,500 |
env-inventory is a Rust library designed to simplify and consolidate the process of fetching, managing, and validating parameters from the environment. Whether you're building a standalone application or integrating multiple crates, env-inventory ensures that all required environment variables are set and accessible in a unified manner. It also seamlessly integrates with TOML files, allowing for hierarchical configurations and fallbacks.
list_all_vars and dump_all_vars allow for introspection, aiding in debugging and ensuring all necessary environment variables have been registered.Add env-inventory to your Cargo.toml:
[dependencies]
env-inventory = "0.2" # Check crates.io for the latest version
Usage
Register the environment variables your application or crate depends on: