Repository navigation
Description
Port the complete libobs/obs-hotkey-dispatch.c.h unit to obs-hotkey after the C-only prerequisite #5327 merges. This is the Phase 6 internal hotkey callback seam used by rust/obs-hotkey/src/ffi/binding_press.rs, not a hotkey lookup or registration API.
Preserve the C behavior pinned by test/cmocka/test_hotkey_dispatch.c: direct callback versus router selection; exact callback data, ID and hotkey identity; press/release and duplicate forwarding; no binding lookup and no pressed-count mutation; installed router ignored when rerouting is disabled; missing router no-op when enabled, including NULL hotkey in that branch; zero-initialized subsystem with a valid direct callback. Live core and delivered-path pointer/callback preconditions remain unchanged. Do not introduce NULL dereferences through field adapters before branch selection.
Implement the safe Rust selection core and thin private ABI shim, using real C-owned core/callback adapters for layout-dependent fields and native callback ABI calls. No copied core layout, placeholder globals or aborting link stubs. Reuse the characterization fixture's external seam so unchanged C assertions exercise the actual Rust implementation. Account for every existing isolated monolith consumer and Rust-static fixture, retain one amalgamated Core state Rust test binary, and verify Linux/MSVC/Darwin linking.
Follow RED then GREEN. Tier 1 ports every C assertion into safe Rust; Tier 2 runs unchanged C tests against hybrid and C-reference libobs with exact symbol parity; Tier 3 compares original C with the Rust shim (including a mutation check); network Tier 4 does not apply. Move the entire extracted file into its ported unity group and register metadata/exports as appropriate. Preserve public headers and existing C tests.
Dependency: #5327 must merge first. Adapter-adding work must honor the #5246 shared-link-support hold: do not add link_support fragments while that hold applies; keep a dependent PR draft if real adapter linkage cannot be provided without them. This issue is the separate Rust swap, not permission to expand the C-only prerequisite.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Nov 21, 2026
Claiming: the Rust swap of
libobs/obs-hotkey-dispatch.c.hintoobs-hotkey. The C-only prerequisite (#5337, Refs #5327) is on master. Plan: RED with the Tier 1 assertions and Tier 3 parity against stubs, then GREEN with the safe selection core, a thin private shim over C-owned core/callback adapters, the unchanged C characterization replayed against hybrid and the C reference, and the extracted file moved into its ported group.rdoupe commentedon Nov 21, 2026
Done in #5399 (merged as 1730fee):
obs-hotkey-dispatch.c.his in its ported group and the master push runs after it are green.obs-hotkey: port hotkey dispatch to Rust (Refs obs-rust#5329) (obs-ru…