Files
wanderbooks/crates/ledger-gui/src/main.rs
T
swaitsandClaude Opus 5.5 cab6e8a334 P2 slice 1: one executable (D-22)
The server and the viewer are libraries with run(prog, args), returning
Exit(code) instead of ending the process; ledger-mcp and ledger-gui are
one-line shims (the live books keep using them until the cutover).
wanderbooks dispatches dev-stdio and gui to them in-process; a mode must
come first and owns its flags. The gui feature (default) leaves the
viewer out of the server-only build, which just server-only builds,
clippies, tests, and checks for window libraries. The viewer's mutation
recipe is retired (owner, 2026-10-18); its two musts are tested
directly. Two review rounds; mutation on the diff (docs/testing.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
2026-10-18 12:27:48 -06:00

13 lines
428 B
Rust

//! `ledger-gui`: the read-only, live viewer. The same viewer is
//! `wanderbooks gui`; both call [`ledger_gui::run`].
fn main() -> Result<(), Box<dyn std::error::Error>> {
match ledger_gui::run("ledger-gui", std::env::args().skip(1)) {
Err(e) => match e.downcast_ref::<ledger_gui::Exit>() {
Some(exit) => std::process::exit(exit.0),
None => Err(e),
},
done => done,
}
}