Skip to content

rust: port the extracted obs_sceneitem_get_order_position to obs-scene #5285

Open

Description

@zackees

Phase 6 follow-up to the C-only characterization/extraction prerequisite #5284. Begin only after its prerequisite PR lands.

Replace the extracted libobs/obs-scene-item-order-position.c.h unit with Rust in obs-scene, preserving the public obs_sceneitem_get_order_position API/ABI. PR #2899 already supplies the Rust attached-item predicate; the remaining parent-list traversal, position count and lock boundary still belong to C today.

Mirror the new test_sceneitem_order_position assertions in the existing Core state category binary: zero-based sibling positions and reordering, group-local/nested counting, NULL/no-parent zero and absent-item list length (characterized, not endorsed). Keep the C characterization unchanged against reference and hybrid. Use real private C boundaries for opaque scene/item handles and preserve lock/read ordering. Add original-C differential coverage and a mutation check, and all required layout/export/host registration validation. Rust runs through soldr; use no new test executable. Network Tier 4 does not apply to this local query. No behavior change or edits to the preserved WebSocket plugin.

Baseline caveat from #2899: libobs-c-reference deliberately compiles the legacy attached-item predicate, which always accepts. NULL and detached public calls are undefined on that reference. The prerequisite pins those early returns in an exact C-body probe supplied the hybrid predicate contract, and exercises valid list walks through both real libraries. The swap must preserve this existing intentional difference, cover hybrid public NULL/detached calls through its real adapter, and exclude only those undefined legacy inputs from differential execution.

Activity

  1. added
    portPort a C unit to Rust (four-tier policy)
    P2Normal priority
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priorityportPort a C unit to Rust (four-tier policy)size:SHours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions