wayland: add ui-events-wayland adapter crate #118
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 318 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.345
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #118"
general
weight: 0.35
waywardmonkeys
Add
ui-events-wayland, an adapter crate that bridges Wayland input into theui-eventsmodel, mirroring the existing winit, web, and Apple adapters.The crate is split in two.
mappingholds platform-neutral, value-based conversions from Wayland input primitives — evdev button and key codes, surface-local coordinates, scroll axes, and modifier and capability bits — intoui-eventsbuilding blocks; it performs no foreign-function calls, references nowayland-clienttypes, and is unit-tested on every target. The stateful reducers that consumewayland-clientandwayland-protocolsevent streams build on those helpers and are gated tocfg(target_os = "linux"), so on every other target the crate compiles to an essentially empty library that pulls in no platform dependencies. It isno_stdand usesalloc; only thexkbfeature pulls instd. It contains nounsafeand ispublish = falsefor now.The reducers cover a seat's input devices:
wl_pointer(motion, buttons, and frame-batched scroll),wl_touch(multi-touch with per-contact geometry and orientation),zwp_pointer_gestures_v1touchpad pinch and rotate,zwp_tablet_tool_v2stylus input, andwl_keyboard. ASeatReduceraggregates the pointer, keyboard, and touch reducers behind a singlewl_seat, tracking its advertised capabilities. Following the recent winit change, every reducer is host-clocked — the caller supplies a monotonic nanosecond timestamp and the surface scale factor — so Wayland input shares one clock and coordinate domain with frame sampling and the rest of the host.The keyboard reducer resolves the physical W3C key code of every key with no system dependencies. An optional, non-default
xkbfeature additionally linkslibxkbcommonand uses the compositor's keymap to resolve logical key values, typed text, the key location, and the authoritative modifier set, including the lock states and the Alt Graph modifier. The keymap is compiled through xkbcommon's safe API, so the crate stays free ofunsafe. Becausexkbcommonlinks a system library and declares no MSRV, the feature is isolated: it is target-gated to Linux and inert elsewhere, and only the commit that adds it touches CI — installinglibxkbcommonon the Linux test job and excluding the feature from the Miri and MSRV jobs.The work is split into self-contained commits — the crate skeleton and neutral mapping, then one reducer per protocol, the
xkbfeature, and finally the seat aggregator — each of which builds and tests green on its own.