Skip to content

Commit 22c7e41

Browse files
Merge branch 'main' into docs/post-rename-hygiene
2 parents 314624b + 2e7b1ab commit 22c7e41

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,6 @@ jobs:
6868
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
6969

7070
- name: Check build
71-
run: cargo check --all-features
71+
# NB: the `gui` feature pulls eframe/egui which raise MSRV above 1.85.
72+
# Verify the default + non-GUI optional features compile on MSRV.
73+
run: cargo check --features signing,http

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ chrono = "0.4"
2424
filetime = "0.2"
2525
encoding_rs = "0.8"
2626
crossterm = "0.29"
27-
eframe = "0.34"
27+
eframe = { version = "0.34", optional = true }
2828
rayon = "1.12"
2929
blake3 = { version = "1.8", features = ["mmap"] }
3030
sha2 = "0.11"
@@ -39,6 +39,9 @@ ureq = { version = "3.3", optional = true }
3939
default = []
4040
signing = ["ed25519-dalek"]
4141
http = ["ureq"]
42+
# Native GUI viewer (eframe/egui). Opt-in because eframe raises MSRV above the
43+
# 1.85.0 baseline; default builds remain pure-CLI and MSRV-clean.
44+
gui = ["eframe"]
4245

4346
[dev-dependencies]
4447
tempfile = "3.27"

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ enum Commands {
468468
headless: bool,
469469
},
470470

471-
/// GUI review of a saved report
471+
/// GUI review of a saved report (requires `--features gui` at build time)
472+
#[cfg(feature = "gui")]
472473
Gui {
473474
/// Assault report JSON file
474475
#[arg(value_name = "REPORT")]
@@ -1700,6 +1701,7 @@ fn run_main() -> Result<()> {
17001701
}
17011702
}
17021703

1704+
#[cfg(feature = "gui")]
17031705
Commands::Gui { report, headless } => {
17041706
let content = read_report_bounded(&report)?;
17051707
let assault_report: AssaultReport = serde_json::from_str(&content)?;

src/report/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
pub mod diff;
66
pub mod formatter;
77
pub mod generator;
8+
#[cfg(feature = "gui")]
89
pub mod gui;
910
pub mod migration;
1011
pub mod output;
@@ -19,6 +20,7 @@ use std::path::Path;
1920
pub use diff::{format_diff, load_report};
2021
pub use formatter::{ReportFormatter, ReportView};
2122
pub use generator::ReportGenerator;
23+
#[cfg(feature = "gui")]
2224
pub use gui::ReportGui;
2325
pub use output::ReportOutputFormat;
2426
pub use tui::ReportTui;

0 commit comments

Comments
 (0)