Skip to content

rust: Port libobs/obs-display state accessors to obs-core #3848

Closed

Description

@zackees

Unit

Port obs_display_set_enabled, obs_display_enabled, and obs_display_set_background_color from libobs/obs-display.c.h into obs-core after verbatim extraction.

Phase and position

Phase 6 small core accessor slice, following the service accessor pattern #3842. Outside obs-service, obs-output, transition and parser work.

Dependencies and existing tests

All three functions remain in C; no matching Rust symbols or cmocka characterization calls exist. Add C-only characterization first (new test and registration fragment), extract verbatim in a separate behavior-neutral commit, then Tier 1 RED/GREEN in obs-tests-core, real-header layout checks, Tier 3 proptest oracle, unchanged Tier 2 OFF/ON, export parity and mutation check.

Notes

Preserve NULL no-op setters and NULL getter false; setters change only the requested field and retain all 32 color bits. No intentional behavior differences or protocol surface. Search found no open issue or PR for this slice; recent display PR #2259 concerns clear decisions only.

/ready

Activity

  1. added
    enhancementNew feature or request
    portPort a C unit to Rust (four-tier policy)
    on Nov 7, 2026
  2. zackees commented on Nov 7, 2026

    @zackees
    MemberAuthor

    Claiming: display state accessors in slot obs-studio4, branch port/display-state-accessors.

    1. Add C-only characterization for NULLs, enabled toggles, full-width color storage, and unrelated-field preservation.
    2. Extract the three C bodies verbatim, then commit Tier 1 RED and open a draft PR today.
    3. Implement obs-core shims and safe core, real-header layout and differential tests; validate Tier 2 OFF/ON, exports and mutation, then queue.
      No work in obs-output, service or excluded series.
  3. zackees commented on Nov 7, 2026

    @zackees
    MemberAuthor

    /ready

  4. zackees commented on Nov 7, 2026

    @zackees
    MemberAuthor

    Implementation is in #3849, GREEN head a2f893c. Local Rust Tier 1/layout/differential: 6 passed; mutation dropping the high color byte kills both behavior parity tests, restored GREEN passes. Unchanged C characterization passes 3/3 on reference and hybrid, verified loaders and 1,767 identical exports. Focused Clippy, format and staged group inventory pass. Full lint encountered a soldr scratch-build lock refusal; full unittest/broad Tier 2 not run, documented in the PR. Final head is pushed; preparing pool handoff with auto-merge pinned to that SHA.

  5. 12 remaining items

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimable

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions