//! Application configuration set once at startup.
//!
//! Compile-time constants ([`PKG_NAME`], [`PKG_VERSION`]) are read from
//! `Cargo.toml` via `env!()`.  Runtime configuration is stored in
//! [`SiteConfig`] and threaded through [`AppState`](crate::routes::AppState)
//! rather than held in process-global statics.

/// Package name read from `Cargo.toml` at compile time.
pub const PKG_NAME: &str = env!("CARGO_PKG_NAME");

/// Package version read from `Cargo.toml` at compile time.
pub const PKG_VERSION: &str = env!("CARGO_PKG_VERSION");

/// Site-wide configuration set once at startup and shared across all handlers.
#[derive(Clone)]
pub struct SiteConfig {
    pub site_name: String,
    pub hostname: String,
    pub ssh_prefix: String,
    pub base_url: String,
    pub favicon: Vec<u8>,
    pub favicon_mime: &'static str,
}
