Skip to content

rust: Port source theme icon callbacks to obs-source #4696

Closed

Description

@zackees

Phase 6 obs-source unit, after prerequisite #4695 lands: swap libobs/obs-source-theme-icon.c.h (obs_source_get_dark_icon and obs_source_get_light_icon) to obs-source Rust while preserving the public C API/ABI.

The prerequisite supplies actual-library C characterization and a verbatim whole-file unit. Preserve obs_source_get_icon_type first, early NULL for every non-CUSTOM icon type, then a distinct get_source_info lookup only for CUSTOM, optional callbacks, exact type_data (including NULL), and borrowed result pointer identity. Do not collapse/cache the two registry lookups. Both dependencies already have callable seams; keep private layout access in a thin C adapter if needed. A NULL ID is valid only with an empty initialized registry under the existing lookup contract.

Claim only after #4695 lands. Start RED with safe-core Tier 1 mirrors of every characterization assertion; GREEN implementation plus thin C ABI shims, layout checks against real headers, original-C Tier 3 differential tests and a mutation check. Keep the prerequisite C test unchanged and run it against both hybrid and C-reference, with identical dynamic symbols. Reuse the Core category binary; no new Rust executable or test-graph edit. Tier 4 is inapplicable. Never edit public headers, existing C tests, obs-websocket or workflows.

Activity

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

    @zackees
    MemberAuthor

    Claiming: source theme icon Rust swap in port/4696-source-icons, slot obs-studio2. 1. Mirror the unchanged characterization in the existing Core binary and commit RED. 2. Reuse source adapters for GREEN plus original-C differential and mutation coverage. 3. Replay both Tier 2 libraries, check Windows and optimized static links, run full lint once, and publish under backpressure policy. First PR expected this session.

  3. zackees commented on Nov 12, 2026

    @zackees
    MemberAuthor

    Verified complete on origin/master 1273c7e. PR #4703 merged as a041aed, an ancestor of that revision. The Rust theme_icon core and source_theme_icon ABI shims preserve icon-type-first dispatch, a distinct CUSTOM-only lookup, optional dark/light callbacks, exact type_data and borrowed result pointers. I verified the reference-only unity/source-set registration, both export entries, six Tier 1 characterization mirrors, original-C oracle/layout/differential coverage, and the registered unchanged test_source_theme_icon C fixture. The prerequisite landed in #4697; #4703 records RED/GREEN, mutation and hybrid/reference validation. No scope remains in this issue; closing as completed. This hygiene pass inspected existing evidence and did not rerun builds or tests.

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

Metadata

Metadata

Assignees

Labels

P2enhancementportreadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions