1.7 KiB
ADR 0002: GUI bindings — wxWidgets shell in C++ + Rust core, spike to revisit
Status: PROPOSED (default; reversible until M3). UPDATE 2026-09-15: the
operator accepted wxWidgets as vendored-in (ADR-0003) and fixed the primary
UI shape (docs/UI-SPEC.md); the binding question (A vs B) is unchanged
and still settled by the M0 spike.
Date: 2026-09-14
Context
The toolkit must present a native cross-platform GUI (wxWidgets chosen). Rust bindings to wxWidgets checked on crates.io 2026-09-14:
wxRust0.0.1-alpha — unmaintained since 2022.wx-rs0.2.0 (2023, self-contained) — ~6k downloads, no 1.0.
Betting the GUI on alpha bindings risks weeks of binding-gap debugging (paste-heavy widgets, worker threads + event loops, GTK/WinCocoa quirks).
Decision
Default: thin C++17 wxWidgets shell (gui/) + Rust core exposed over a
small stable C ABI (cdylib from alkane-core, header generated with
cbindgen). The shell holds frames, lists, the install wizard, and event
glue only — no business logic, no safety logic. All invariants, engines,
and tests live in Rust where they are testable headlessly.
Gate: M0 runs a time-boxed wx-rs spike (window + list/tree + wizard flow
- worker-thread progress + cancel on Linux and Windows). If the spike is solid, flip to pure Rust; either way the decision is recorded before M3.
Consequences
- The repo builds two things: a Rust workspace and a small C++ app linked
against the core cdylib. CMake in
gui/. - Core API surface stays small and event-oriented (discover, identify, plan, execute, cancel, progress events, log tail) — good FFI hygiene and a natural match for the CLI too (D4).
- If wx-rs wins the spike, the C ABI is kept as an integration boundary for scripted/HIL use anyway.