Skip to content

rust: Port single-hotkey registration entry points to obs-hotkey after extraction #4425

Closed

Description

@zackees

Phase 6 follow-up to #4421. After its separate C characterization/extraction prerequisite lands, port libobs/obs-hotkey-register.c.h to obs-hotkey. Functions: obs_hotkey_register_frontend, obs_hotkey_register_encoder, obs_hotkey_register_output, obs_hotkey_register_service and obs_hotkey_register_source.

Preserve the public ABI and current behavior: frontend has no owner/context, object wrappers reject NULL, sources also reject private owners, unavailable core returns OBS_INVALID_HOTKEY_ID, successful calls acquire the correct weak owner and use that owner's context, forward callback/data/name/description to obs_hotkey_register_internal, and unlock after registration. The internal registration engine remains a dependency. Keep any state/context/lock adapter narrow and private, check NULL before C field access, and link real adapters into Rust-static consumers where necessary.

The prerequisite adds test/cmocka/test_hotkey_register.c through a standalone tests.d fragment. Its unavoidable graph update also keeps seven pre-existing isolated-core fixtures compiling the extracted wrappers with their local private dependencies; preserve that coverage. Port its assertions 1:1 into the existing core-state Rust category binary. Require RED tests against stubs then GREEN safe Rust, unchanged C characterization against hybrid and C-reference, randomized differential tests with a mutation check, ABI/symbol parity, and platform-boundary compliance. Tier 4 is not applicable (no network protocol). Do not modify existing C tests, public headers, or plugins/obs-websocket. This issue excludes paired registration, enumeration and the internal allocation/registration engine.

Dependency: #4421 must land before implementation; this issue is not being claimed by the extraction worker.

Activity

  1. added
    enhancement
    port
    P2
    size:S
    ready
    on Nov 9, 2026
  2. zackees commented on Nov 9, 2026

    @zackees
    MemberAuthor

    Claiming: single-hotkey registration Rust port; worker im-st-4425-hkregister in obs-studio13, branch port/4425-hotkey-register stacked on test/hotkey-register-extract at f37a383. 1. Commit RED safe-core characterization tests in the existing core-state binary. 2. Implement the Rust core and private FFI bridge with oracle differential coverage. 3. Run focused compatibility checks, formatting and full lint once, then push the verified branch. Branch-only pool assignment: no PR until the manager drains the queue; target handoff this session.

  3. moved this from In progress to Ready in obs-rust Multiviewon Nov 11, 2026
  4. zackees commented on Nov 16, 2026

    @zackees
    MemberAuthor

    Claiming: single-hotkey registration Rust swap; worker st-4425 in obs-studio7, branch port/4425-hotkey-register-stacked, stacked on #4908 at 5162abb. 1. Commit RED safe-core tests in the existing core-state category binary. 2. Implement the Rust registration wrappers and narrow real adapters, with unchanged C and oracle differential coverage. 3. Run focused tests and full lint once, then publish an unarmed draft listing only this port’s commit range; target handoff this session. Excludes unregistration and object-bound pairs.

  5. moved this from Ready to In progress in obs-rust Multiviewon Nov 17, 2026
  6. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Landed on master in #4920 (82e680c); verified the merge is an ancestor of origin/master and rust/obs-hotkey/src/ffi/register.rs exists there.

  7. moved this from In progress to Done in obs-rust Multiviewon Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancementportreadysize:S

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions