| Crates.io | tryphon |
| lib.rs | tryphon |
| version | 0.2.0 |
| created_at | 2025-11-11 09:01:00.184824+00 |
| updated_at | 2025-11-11 16:10:15.579685+00 |
| description | Type-safe configuration loading from environment variables using derive macros |
| homepage | https://github.com/katlasik/tryphon |
| repository | https://github.com/katlasik/tryphon |
| max_upload_size | |
| id | 1926890 |
| size | 109,937 |
A type-safe Rust library for loading configuration from environment variables using derive macros.
[dependencies]
tryphon = "0.2.0"
use tryphon::{Config, Secret};
#[derive(Debug, Config)]
struct AppConfig {
#[env("DATABASE_URL")]
database_url: String,
#[env("API_KEY")]
api_key: Secret<String>,
#[env("PORT")]
#[default(8080)]
port: u16,
}
match AppConfig::load() {
Ok(config) => {
println!("Server starting on port {}", config.port);
}
Err(e) => {
eprintln!("Configuration error: {}", e);
}
}
📚 Full Documentation on docs.rs
For detailed usage examples, supported types, and API reference, see the full documentation.
MIT License