Skip to content

rust: Port libobs/obs-object-id.c.h to obs-core #5234

Closed

Description

@zackees

Unit

Port libobs/obs-object-id.c.h:3-22 (obs_obj_get_id) to obs-core.

Phase and position

Phase 6 core object queries, after the extracted generic-object query prerequisite. Refs #5088; its extraction and complete characterization merged in #5122.

Dependencies and existing tests

test/cmocka/test_object_id.c already covers NULL, invalid/canvas/unknown kinds, all four supported kinds, NULL/empty IDs, encoder info.id rather than orig_info.id, borrowed pointer identity and complete object immutability. Preserve it unchanged against C-reference and hybrid libobs. Reuse the shared demand-linked real-adapter archive introduced in #5190, following the #5211 obs-core swap.

Notes and acceptance

Keep private layouts in real-header C adapters. Rust checks NULL before any projection and dispatches by kind before any type-specific ID-field access; unsupported objects may contain only a context. No public headers or existing C tests change. No allocation, mutation or intentional behavior differences.

Commit Rust safe characterization mirrors against a stub (RED), then the implementation and ABI swap (GREEN). Add original-C Tier 3 differential and mutation evidence in the existing Core state binary. Verify obs-core, the whole native_build module, focused Linux OFF/ON characterization and every configured *_rust target, Windows link check and separate Darwin arm64 link check; inspect Darwin bindings for any fake-overridden seams. Formatting and one full lint. Tier 4 is inapplicable to this non-protocol metadata query. No features-ledger entry is needed for a behavior-preserving port.

The exact-symbol and semantic all-state searches found only the completed prerequisite, with no active follow-up. Coordinate shared obs-core module lists and the core C unity group with rdoupe's unrelated work before publishing.

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: generic object ID Rust swap in pool slot fix5159, branch port/5234-object-id. 1. Commit safe mirrors of the existing characterization against a stub (RED). 2. Implement lazy kind dispatch with real private adapters and original-C differential/mutation coverage (GREEN), reusing #5190 support. 3. Verify all required Linux/native/cross-link checks, check shared-file conflicts, then publish under backpressure and arm the pinned head. First PR expected this session after verification under the pool publication contract. No overlap in symbols with rdoupe’s other obs-core work.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5239 (6360849): the generic object ID query now runs in safe Rust in obs-core.

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