Skip to content

rust: Port libobs/obs-source-get-weak.c.h to obs-source #5228

Open

Description

@zackees

Port the extracted obs_source_get_weak_source body from libobs/obs-source-get-weak.c.h:6-14 into obs-source (Phase 6 core-source lane). Refs #5129; the characterization/extraction prerequisite merged in #5151, and the related source properties swap #5210 supplies the adapter/link structure.

Preserve the unchanged test/cmocka/test_source_get_weak.c contract: NULL source returns NULL without logging or projection, NULL control remains a no-op, each acquisition returns the exact control token and adds exactly one weak reference, strong count and source bytes stay untouched, and acquired handles survive source teardown. Leave release ownership in C and preserve native C long width.

Acceptance: Tier 1 RED stub then GREEN in the existing Core state binary, original-C Tier 3 differential and mutation evidence, unchanged Tier 2 OFF/ON plus equal exports, whole native_build module, every Linux *_rust fixture, Windows and Darwin linkage, formatting and one full lint. Use a narrow real private adapter and the shared demand-linked adapter archive from #5190. No public-header, existing-C-test, WebSocket or workflow edits. Tier 4 is inapplicable to this non-protocol unit.

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: source weak-handle acquisition Rust swap in pool slot obs-studio5 (src-get-weak-swap). 1. Commit Tier 1 RED mirrors against a stub. 2. Implement the safe orchestrator, real narrow control/addref adapters and original-C differential coverage. 3. Validate unchanged OFF/ON, every Rust-static target and cross links, then publish through ./push subject to backpressure. First PR expected this session.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Releasing: parked by manager to fix #5226 first

  4. rdoupe commented on Nov 19, 2026

    @rdoupe
    Collaborator

    Claiming: #5228

    obs_source_get_weak_source is still C on master (libobs/obs-source-get-weak.c.h). Plan, following the obs_source_configurable swap (#5139):

    1. RED: mirror every assertion of test_source_get_weak.c in the existing core-state binary against a Rust stub.
    2. GREEN: safe Rust in obs-source with narrow control/addref adapters through the shared support archive; original C stays only in its reference group, with a Tier 3 differential against it.
    3. Unchanged Tier 2 OFF/ON, lint, PR.
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