Skip to content

rust: Port generic weak-object reference helpers to obs-core #4258

Closed

Description

@zackees

Phase 6 Rust replacement of libobs/obs-weak-object-refs.c.h in obs-core after prerequisite #4254 lands. Functions: obs_weak_object_addref, obs_weak_object_release, obs_object_get_weak_object, obs_weak_object_get_object.

Dependency: #4254 characterizes the actual libobs C API in test/cmocka/test_weak_object_refs.c and extracts these four functions verbatim from libobs/obs.c.h. Wait for it to land before the Rust swap. obs_weak_object_expired is separate work under #4144 and is excluded.

Test plan: port every characterization assertion to safe Rust Tier 1 tests in the existing obs-tests-core category; RED against todo stubs then GREEN; add thin C ABI shims and private field adapters with NULL checks before accessor calls; Tier 3 bounded differential tests against original extracted C through obs-c-oracle, including mutation evidence. Preserve zero-based reference counts, expired promotion behavior, allocation ownership and pointer identity. Reuse unchanged characterization against both reference and hybrid libobs, including symbol parity (Tier 2). Link real adapter sources into all Rust-static consumers where required. Tier 4 is inapplicable to these local reference helpers. No existing C tests, public headers or WebSocket changes.

Activity

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

    @zackees
    MemberAuthor

    Claiming: generic weak-object reference Rust follow-up on branch port/4258-weak-object-refs, stacked on port/4254-weak-object-refs-extract at f0f131b. 1. Verify prerequisite direct C characterization. 2. Commit RED safe-core tests, implement GREEN and parity coverage, then integrate the ABI swap where validation permits. 3. Push branch only and report exact own commit range; no PR will be opened until the queue drains, per maintainer instruction.

  3. moved this from Ready to In progress in obs-rust Multiviewon Nov 9, 2026
  4. moved this from In progress to Ready in obs-rust Multiviewon Nov 10, 2026
  5. zackees commented on Nov 17, 2026

    @zackees
    MemberAuthor

    Claiming: continuing the held generic weak-object reference swap on new branch port/4258-weak-object-refs-land. 1. Confirmed prerequisite #4930 for #4254 merged at fe472db. 2. Cherry-pick only the original #4258 RED/GREEN commits onto current master, preserving port/4258-weak-object-refs. 3. Re-verify focused Rust, differential and unchanged Tier 2 tests against reference and hybrid, run lint, then publish and arm the PR. Expected PR this session; the pool publication hold has ended.

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

    @zackees
    MemberAuthor

    Landed in #4951 (merge 3ae0e74). The four weak-object helpers are implemented in obs-core Rust (rust/obs-core/src/ffi/weak_object_refs.rs) with Tier 1 and differential tests, and the C file is in the ported source set weak-object-refs. Closing.

  8. 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

Labels

P2enhancementportreadysize:S

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions