tryphon 0.1.0

Type-safe configuration loading from environment variables using derive macros
Documentation

Tryphon

A type-safe Rust library for loading configuration from environment variables using derive macros.

Crates.io Documentation

Installation

[dependencies]
tryphon = "0.1.0"

Quick Example

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);
    }
}

Documentation

📚 Full Documentation on docs.rs

For detailed usage examples, supported types, and API reference, see the full documentation.

License

MIT License