jevsnes.git / apps / native / src / main.rs

Entry point only: dispatch between the stdio MCP proxy and the window.

Deliberately tiny (2026-09-20 split) - the window itself, App and its patch points live in app.rs, ITS OWN rust_library target, so that tools/hotpatch/patch.sh never has to relink this executable to pick up an edit there or in packages/panels. See app.rs's doc comment and ../CLAUDE.md.

9use std::env;
10use std::process::ExitCode;
12fn main() -> ExitCode {
13    if env::args().nth(1).as_deref() == Some("mcp") {
14        return mcp::proxy::run();
15    }
16    match app::window() {
17        Ok(()) => ExitCode::SUCCESS,
18        Err(e) => {
19            eprintln!("{e}");
20            ExitCode::FAILURE
21        }
22    }
23}