Skip to content

rust: Port libobs/obs-output-starting-queries.c.h to obs-output #5233

Closed

Description

@zackees

Phase 6 Rust swap of the C-only prerequisite in #5229. Wait for that prerequisite PR to merge before starting; target obs-output and the existing Core state category binary obs-tests-core.

Replace the whole extracted libobs/obs-output-starting-queries.c.h unit with safe Rust decision logic plus thin private FFI adapters. Preserve obs_output_needs_encoders and obs_output_starting as hidden internal symbols, the existing live non-NULL output precondition, and C-owned atomic semantics. Needs-encoders reads active, starting, reconnecting and delay-active only until true; starting omits active and reads starting, reconnecting and delay-active only until true. Never eagerly snapshot all flags. Keep atomic flag loads in real C adapters and use a lazy safe-core API.

Acceptance: RED then GREEN safe-core tests mirror every C characterization assertion in the existing category binary, with all 16 states, exact pointer/read order, skipped loads and unchanged storage. Select OUTPUT_STARTING_QUERIES_EXTERNAL to relink the prerequisite recorder fixture through the real Rust/private adapter boundary without editing its assertions; route the real atomic adapter loads to output_starting_recording_load_bool for this recording fixture only; preserve all existing C tests and public headers. Add real-header layout coverage where a new ABI layout is introduced and original-C differential tests with a killed mutation. Run unchanged failed-start/bind/reset tests OFF/ON with symbol parity; Tier 4 does not apply to these internal booleans.

List both internal ABI symbols in the unit's rust-hidden fragment, never public exports. Register the whole-file C reference/oracle and sorted inventories. Every new Rust-referenced C adapter must link its real source into EVERY standalone Rust-static cmocka consumer through tests.d link support, with no aborting stubs. Build EVERY Linux *_rust target and the new characterization, and run ci/windows_link_check.py; if Windows fails, run ci/cmocka_link_check.py --alias mac-arm64 separately. Explicitly cross-link this non-Rust C fixture too. Run the whole native_build:: module and ./lint, refresh forced fetched PR conflicts and serialize queued overlaps before publishing.

Decisions: ready / P2 / port / size:S after the prerequisite merges. No platform defaults, new Rust test executables, WebSocket changes or new workflows.

Prerequisite PR: #5232, libobs: characterize and extract output encoder-demand/start predicates (Refs #5229). It is armed for the merge queue; implementation waits for it to merge.

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: #5233 in pool slot fix5159, branch port/5233-output-starting-queries. 1. Add RED safe-core coverage mirroring the immutable characterization, then implement lazy short-circuit queries with C atomic adapters. 2. Validate differential/mutation, OFF/ON unchanged fixtures, every Rust-static consumer and Darwin symbol binding. 3. Run native_build, formatting and lint, screen open-PR conflicts, then publish and arm the verified head subject to backpressure. First PR expected this session.

  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Landed on master in #5250 (1693ae5): the output encoder-demand/start predicates now run in safe Rust in obs-output.

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