Skip to content

rust: Port libobs/obs-hotkey-unregister-entry.c.h to obs-hotkey #5198

Closed

Description

@zackees

Unit

Replace the whole extracted libobs/obs-hotkey-unregister-entry.c.h with Rust in obs-hotkey, preserving the exported obs_hotkey_unregister and obs_hotkey_pair_unregister C API/ABI. Phase 6 hotkey registry entry points, Refs #4427 and #4797.

Dependencies and existing tests

Blocked by the prerequisite characterization and behavior-neutral extraction in #5175. Wait for that PR to merge and start from current master. Reuse the existing registry lock/unlock seams, already-ported obs_hotkey_unregister_one, and the real private obs_hotkey_unregister_pair_call adapter. The pair helper remains C and its member removal, hash deletion and free order are unchanged. This issue does not include pair registration, context release, shutdown or any other sibling unit.

Keep test_hotkey_unregister_entry.c, test_hotkey_unregister.c, test_hotkey_press_state.c and test_hotkey_pair_register.c unchanged. The new recorder exercises the real pair helper with controlled mutex/single-remover calls; relink it to the replacement entry wrappers, retaining the existing fixture core rather than accidentally calling the shared-library registry.

Acceptance criteria

Mirror every applicable C assertion in safe Rust in the existing Core state category (soldr cargo test -p obs-data --test obs-tests-core) under the owning hotkey suite modules; add no test executable. Commit and demonstrate RED stubs before GREEN. Preserve no-core silence, one balanced lock per live-core dispatch, exact size_t ID forwarding (including invalid and high-bit IDs), missing/repeated pair behavior and first-member/second-member/deletion/free ordering. Preserve notification, binding-release and weak-owner behavior in the existing remover.

Add thin ABI exports and per-unit export/source/oracle metadata; exclude the whole extracted C file from hybrid production while retaining the original oracle and C reference. Differential-test the safe core and ABI against original C with bounded edge and random cases, demonstrate mutation failure, and cover real-header layouts if any cross the new boundary. Preserve identical public symbol sets and all documented exclusions.

Run the unchanged C characterization against hybrid and C reference, the whole native_build module, and focused Linux Tier 2 links of unrelated *_rust targets. On macOS and Windows also run the CMake test executable against Cargo-native obs-c-reference (#5182); do not infer platform defaults or generated data from Linux. Use C-width types directly (c_long is i32 on Windows). Link every real private adapter needed by Rust-static consumers through tests.d link-support fragments; run ci/windows_link_check.py and reject NULL before any permitted owner field accessor. Never add aborting stubs or Windows max_align_t.

Run repository lint; use soldr for Rust, uv for Python and ./push for publication. No public headers, existing C tests, WebSocket plugin, new workflows or behavior fixes. Tier 4 is inapplicable to this non-protocol wrapper swap; preserve the unchanged C++ plugin compatibility contract.

Prerequisite publication: #5197 (Refs #5175). The verified extraction head is df1eedd. The new C recorder has four cases and is frozen from the RED commit.

Activity

  1. added
    portPort a C unit to Rust (four-tier policy)
    readyMeets the definition of Ready; claimable
    P2Normal priority
    on Nov 19, 2026
  2. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Claiming: #5198 hotkey unregistration entry Rust swap in pool slot obs-studio2.

    1. Mirror the frozen libobs: characterize and extract hotkey unregistration entry points (Refs #5175) #5197 characterization against RED safe-core stubs, then implement the entry dispatch using the existing hotkey lock/unlock seams and real pair adapter, following merged obs-hotkey: swap injected-event dispatch to Rust (Refs #5192) #5206.
    2. Add per-unit source/export/oracle metadata and bounded Tier 3 differential/mutation coverage without changing public headers or existing C tests.
    3. Verify hotkey tests, the full native_build module, focused OFF/ON Linux characterizations and every *_rust target, MSVC/Darwin links, formatting and repository lint; check overlapping PR merges before publication.

    First PR after the verified GREEN head and backpressure check, expected this worker session. Refs #5198.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5220 (83ad8ec): hotkey unregistration entry dispatch now runs in Rust in obs-hotkey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Normal priorityportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimablesize:SHours

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions