Skip to content

Commit 7afaab1

Browse files
hyperpolymathclaude
andcommitted
chore(msrv): feature-gate eframe/egui behind opt-in gui feature
`eframe = "0.34"` (and the egui chain it pulls) raises MSRV above 1.85.0, which conflicts with the project's declared `rust-version = "1.85.0"`. The MSRV CI job ran `cargo check --all-features` against 1.85, so any push silently passed (the job is currently red on main) or would fail once toolchain caches refresh. Move eframe into a new opt-in `gui` feature. The default and existing optional features (`signing`, `http`) stay MSRV-clean; users who want the native viewer build with `--features gui` on a newer toolchain. Changes: - Cargo.toml: `eframe = { ..., optional = true }`; add `gui = ["eframe"]`. - src/report/mod.rs: cfg-gate `mod gui` and the `pub use ReportGui`. - src/main.rs: cfg-gate the `Commands::Gui` clap variant and its match arm. - .github/workflows/rust-ci.yml: MSRV `cargo check` now uses `--features signing,http` (drops `--all-features` to exclude `gui`). Verified locally: * `cargo check` — OK (default) * `cargo check --features signing,http` — OK (the new MSRV check command) * `cargo check --features gui` — OK (opt-in build still works) * `cargo clippy --all-features --all-targets -- -D warnings` — clean * `cargo test --features signing,http --no-fail-fast` — all 17 suites OK * `cargo fmt --check` — clean Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a9b23d8 commit 7afaab1

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)