Skip to content

rust: Port libobs/obs-data.c to obs-data #784

Closed

Description

@nathan-v

Unit

libobs/obs-data.c to obs-data.

Phase and position

Phase 6, first core seam, tracker #444. The testing policy names this file first because obs-data.h is opaque handles. obs-properties.c, the hotkey name map, and the effect and shader parsers stay unclaimed.

Dependencies and existing tests

Depends on bmem, dstr, and jansson, which are already available. No cmocka characterization test exists. Other tests call obs_data_create as settings storage. Those tests stay unchanged. The characterization test lands first, with no Rust.

Notes

Header inline obs_data_newref stays in obs-data.h. That header is not edited. User, default, and autoselect values share one item allocation. A getter for a missing user value reads whatever bytes sit at the front of that allocation. JSON export omits an item that has no user value unless defaults are requested. Array elements that are not JSON objects are skipped. Those cases get pinned as characterized, not endorsed.

Activity

  1. nathan-v commented on Oct 15, 2026

    @nathan-v
    ContributorAuthor

    Claiming: libobs/obs-data.c

    1. Characterization PR, no Rust: test/cmocka/test_obs_data.c pins JSON parsing and errors, reference counts, user/default/autoselect precedence, arrays, vec and frame-rate helpers, and file save/load. Existing tests stay as they are. Odd cases are marked characterized, not endorsed.
    2. Port PR, RED: Tier 1 copies those assertions onto todo!() stubs in obs-data.
    3. GREEN: safe core, C shims, Tier 3 parity against this file, and ENABLE_RUST_LIBOBS drops obs-data.c. obs-data.h is not edited. obs_data_newref stays the header inline.

    First PR today. Please add the claimed label; I cannot.

    Refs #444

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions