diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index b33d5eb..94879a9 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -68,4 +68,6 @@ jobs: uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2 - name: Check build - run: cargo check --all-features + # NB: the `gui` feature pulls eframe/egui which raise MSRV above 1.85. + # Verify the default + non-GUI optional features compile on MSRV. + run: cargo check --features signing,http diff --git a/Cargo.toml b/Cargo.toml index c941029..bc88b75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ chrono = "0.4" filetime = "0.2" encoding_rs = "0.8" crossterm = "0.29" -eframe = "0.34" +eframe = { version = "0.34", optional = true } rayon = "1.12" blake3 = { version = "1.8", features = ["mmap"] } sha2 = "0.11" @@ -39,6 +39,9 @@ ureq = { version = "3.3", optional = true } default = [] signing = ["ed25519-dalek"] http = ["ureq"] +# Native GUI viewer (eframe/egui). Opt-in because eframe raises MSRV above the +# 1.85.0 baseline; default builds remain pure-CLI and MSRV-clean. +gui = ["eframe"] [dev-dependencies] tempfile = "3.27" diff --git a/src/main.rs b/src/main.rs index 90a2210..b4009e8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -468,7 +468,8 @@ enum Commands { headless: bool, }, - /// GUI review of a saved report + /// GUI review of a saved report (requires `--features gui` at build time) + #[cfg(feature = "gui")] Gui { /// Assault report JSON file #[arg(value_name = "REPORT")] @@ -1700,6 +1701,7 @@ fn run_main() -> Result<()> { } } + #[cfg(feature = "gui")] Commands::Gui { report, headless } => { let content = read_report_bounded(&report)?; let assault_report: AssaultReport = serde_json::from_str(&content)?; diff --git a/src/report/mod.rs b/src/report/mod.rs index 74f3c1b..d933d4a 100644 --- a/src/report/mod.rs +++ b/src/report/mod.rs @@ -5,6 +5,7 @@ pub mod diff; pub mod formatter; pub mod generator; +#[cfg(feature = "gui")] pub mod gui; pub mod migration; pub mod output; @@ -19,6 +20,7 @@ use std::path::Path; pub use diff::{format_diff, load_report}; pub use formatter::{ReportFormatter, ReportView}; pub use generator::ReportGenerator; +#[cfg(feature = "gui")] pub use gui::ReportGui; pub use output::ReportOutputFormat; pub use tui::ReportTui;