···5454// Internal modules
5555mod logging;
56565757+use std::sync::LazyLock;
5758use std::{env, path::PathBuf};
58595960use build::execute_build;
···6162use logging::init_logging;
6263use route::FullRoute;
63646565+static IS_DEV: LazyLock<bool> = LazyLock::new(|| {
6666+ std::env::var("MAUDIT_DEV")
6767+ .map(|v| v == "true")
6868+ .unwrap_or(false)
6969+});
7070+6471/// Returns whether Maudit is running in development mode (through `maudit dev`).
6572///
6673/// This can be useful to conditionally enable features or logging that should only be active during development.
6774/// Oftentimes, this is used to disable some expensive operations that would slow down build times during development.
6875pub fn is_dev() -> bool {
6969- env::var("MAUDIT_DEV").map(|v| v == "true").unwrap_or(false)
7676+ *IS_DEV
7077}
71787279#[macro_export]