Envie
Envie is a lightweight and user-friendly library for managing environment variables in Rust. It allows you to load and parse .env files effortlessly and provides type-safe access to environment variables for seamless integration into your applications.
Key Features
- Automatically loads .env files
- Retrieves environment variables by key
- Supports type-safe conversions (e.g., boolean, integers)
- Fallback to system environment variables
Installation
Add Envie to your Cargo.toml file:
= "0.1.2"
Then run:
Usage
Here’s a quick example of how to use Envie:
Load environment variables
use Envie;
Example .env file
DATABASE_URL=postgres://user:password@localhost:5432/mydb
DEBUG_MODE=true
Why Envie?
Envie makes managing environment variables simple and intuitive while maintaining Rust's type safety and performance standards. Whether you’re working on small projects or large-scale applications, Envie ensures your configuration is accessible and reliable.
License
This project is licensed under the MPL-2.0 License. See the LICENSE file for details.