Skip to content

Port obs_service_get_signal_handler and obs_service_get_proc_handler to Rust #5002

Closed

Description

@zackees

Scope: port obs_service_get_signal_handler and obs_service_get_proc_handler from libobs/obs-service-handler-getters.c.h to safe Rust in obs-output, preserving their hidden visibility and borrowed-pointer semantics. Refs #3840 (handler slice only).

Prerequisite: C-only extraction and characterization on branch test/3840-service-handler-getters (pool slot obs-studio6). Land that prerequisite before starting the Rust swap. The new test_service_handler_getters compiles the actual C source, and is explicitly C-source-only; its future Rust-static variant must call the real Rust implementation.

Acceptance:

  • Tier 1 characterization mirrors against stubs, committed and observed RED before GREEN, in the existing obs-tests-core binary.
  • Preserve NULL diagnostics under each getter's exact name and service parameter, independently nullable handler fields, pointer identity, no allocation/refcount change and unchanged service state.
  • Check NULL in Rust before any private field-address accessor. Add only the private real C adapter needed for field access, with real-header layout checks.
  • Keep this prerequisite's C test unchanged, add a Rust-static variant and a tests.d link-support fragment linking the REAL adapter static library to every standalone consumer; no aborting stubs.
  • Retain the extracted C as the prefixed oracle, compile with Clang -Wformat-nonliteral -Werror, add differential and mutation evidence, and preserve the hybrid/reference symbol sets and existing Tier 2.
  • Add the per-port native registration entry and sorted rust/README.md row, run Windows MSVC link validation and the application native_build tests.

No public header changes, no new Rust test binary, no obs-websocket changes. Tier 4 does not apply to these private borrowed getters.

Activity

  1. added
    enhancement
    port
    on Nov 17, 2026
  2. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Landed on master in #5016 (76450af): obs_service_get_signal_handler and obs_service_get_proc_handler are now Rust in obs-output, with the unchanged characterization from #5013.

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

    enhancementport

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions