Rewrite Curator in Rust with an egui GUI

This commit is contained in:
2026-10-17 11:28:17 +02:00
parent 364b515e3c
commit 65b5b74c9f
156 changed files with 24359 additions and 25795 deletions
+24
View File
@@ -0,0 +1,24 @@
//! Application-level constants (name, version, debug flag, window title).
use std::env;
pub const APP_NAME: &str = "Curator";
/// The project version — `Cargo.toml` is the single source of truth.
pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
/// Default main-window size when no geometry has been saved yet.
pub const DEFAULT_WINDOW_SIZE: (f32, f32) = (1200.0, 800.0);
/// True when `ENV_DEBUG` is set to a truthy value (`true` / `1` / `yes`).
pub fn debug_mode() -> bool {
env::var("ENV_DEBUG")
.map(|v| matches!(v.to_lowercase().as_str(), "true" | "1" | "yes"))
.unwrap_or(false)
}
/// `Curator v1.2.3`, with a `-DEV` suffix in debug mode.
pub fn app_title() -> String {
let suffix = if debug_mode() { "-DEV" } else { "" };
format!("{APP_NAME} v{APP_VERSION}{suffix}")
}