You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: Port libobs/obs-properties.c to obs-properties #828
claimedAn agent or person has claimed this; check the claim comment before startingenhancementNew feature or requestportPort a C unit to Rust (four-tier policy)
libobs/obs-properties.c (1415 lines, 108 exported functions in obs-properties.h) to a new obs-properties crate.
Phase and position
Phase 6, tracker #444: the next core seam after obs-data.c (#784, #801). #444 lists obs-properties.c, the hotkey name map and the effect/shader parser as separately claimable; this is the first of them.
Dependencies and existing tests
Depends on bmem, darray (ported) and obs_data (ported, #801) for the settings passed to modified callbacks. No cmocka test exercises obs_properties_*/obs_property_* directly (only plugin tests that build properties incidentally), so a characterization test test/cmocka/test_obs_properties.c lands first, C only.
Notes
One libobs-internal touch: obs_property_button_clicked reads ((struct obs_context_data *)obj)->data. The port keeps that layout read through a narrow C accessor, not a Rust mirror of obs_context_data.
Opaque handles only (obs_properties_t, obs_property_t); the header is not edited.
Callbacks (modified, modified2, button, the group/parent chain via get_topmost_parent) cross the FFI boundary in both directions: Tier 3 drives both sides with the same C callbacks.
Odd cases (lookups by name across groups, obs_properties_add_* duplicate names, list item removal, obs_properties_apply_settings ordering) are pinned as characterized, not endorsed.
Characterization PR, no Rust: test/cmocka/test_obs_properties.c pins creation and destruction, every obs_properties_add_* type and its getters/setters, lookup by name including inside groups, duplicate names, list items (add/insert/remove/clear, disabled items), modified/modified2/button callbacks and the topmost-parent chain, obs_properties_apply_settings, groups and obs_properties_get_parent. Odd cases marked characterized, not endorsed.
RED: obs-properties crate with todo!() cores, Tier 1 1:1 port of that test, Tier 3 parity against the C compiled as an oracle.
GREEN: the port, ENABLE_RUST_LIBOBS=ON drops obs-properties.c.
Done: #830 characterized obs-properties.c (C only) and #832 ported it to the obs-properties crate (Tier 1 1:1, Tier 3 parity on random call sequences against the original C, Tier 2 245/245 OFF and ON; ENABLE_RUST_LIBOBS=ON drops the C file).
Intentional differences, all where C crashes or leaks: null names and obs_properties_get_parent(NULL) return null; inserts past the end are ignored; a set added to two groups is shared, not double-freed; neither leak from #831 is reproduced.
claimedAn agent or person has claimed this; check the claim comment before startingenhancementNew feature or requestportPort a C unit to Rust (four-tier policy)
Activity
zackees commentedon Oct 15, 2026
Claiming: libobs/obs-properties.c
test/cmocka/test_obs_properties.cpins creation and destruction, everyobs_properties_add_*type and its getters/setters, lookup by name including inside groups, duplicate names, list items (add/insert/remove/clear, disabled items), modified/modified2/button callbacks and the topmost-parent chain,obs_properties_apply_settings, groups andobs_properties_get_parent. Odd cases marked characterized, not endorsed.obs-propertiescrate withtodo!()cores, Tier 1 1:1 port of that test, Tier 3 parity against the C compiled as an oracle.ENABLE_RUST_LIBOBS=ONdropsobs-properties.c.First PR (step 1) today.
test: Format test_obs_properties.c
obs-properties: Port libobs/obs-properties.c (GREEN)
zackees commentedon Oct 15, 2026
Done: #830 characterized
obs-properties.c(C only) and #832 ported it to theobs-propertiescrate (Tier 1 1:1, Tier 3 parity on random call sequences against the original C, Tier 2 245/245 OFF and ON;ENABLE_RUST_LIBOBS=ONdrops the C file).Intentional differences, all where C crashes or leaks: null names and
obs_properties_get_parent(NULL)return null; inserts past the end are ignored; a set added to two groups is shared, not double-freed; neither leak from #831 is reproduced.Left: #831 (fix the two leaks in the C original).
test: Characterize obs-properties.c before port (obs-rust#830)
obs-properties: Port libobs/obs-properties.c (obs-rust#832)