Skip to content

rust: Port the module list seam (obs-module-lists-seam.c) #4219

Closed

Description

@rdoupe

Unit

New libobs/obs-module-lists-seam.h / libobs/obs-module-lists-seam.c.h (live C in libobs.core+): the module-list seam, so the coming port of libobs/obs-module-lists.c.h (the module list calls extracted in #4139) to rust/obs-core can reach the core's module lists and a module's fields without the struct layouts of obs-internal.h.

Each accessor is a single read or field address, copied from the line of obs-module-lists.c.h it wraps:

  • The core: whether obs is set (obs_add_module_path, obs_add_safe_module, obs_add_disabled_module); obs->first_module (obs_log_loaded_modules); obs->module_config_path (obs_module_get_config_path); and the struct darray inside obs->module_paths, obs->safe_modules and obs->disabled_modules (the three da_push_back() calls).
  • A module: next and file (obs_log_loaded_modules); data_path (obs_find_module_file); mod_name (obs_module_get_config_path); and the struct darray inside sources, outputs, encoders and services (the four obs_module_add_* calls).

None checks its arguments or takes a lock: none of the list calls takes one today. Hidden in libobs (not EXPORT), like the core-audio and transition seams' accessors. No C caller changes: obs-module-lists.c.h keeps its direct reads until the port replaces them.

Phase and position

Phase 6 (libobs core), the "internal accessors or adapter seams" item of the Phase 6 tracker (#444); tracking issue #4. It is the second of three steps for the module list calls: after their extraction (#4133, merged as #4139) and before their port into obs-core, beside the module rules that are already Rust (module_paths, module_names, module_load_rules).

Dependencies and existing tests

  • None open: obs-module-lists.c.h is on master.
  • Nothing tests these accessors yet. A new test, test/cmocka/test_module_lists_seam.c, builds the seam into itself (the accessors are hidden) over a stand-in core and stand-in modules, as test_audio_seam does. It pins each read against the field it wraps, and each address against the typed array behind it: pushing through the address with darray_push_back() shows up in the typed list.

Notes

No behaviour change and no Rust. The seam file stays live C and never moves into a ported group. The export sets of the C, hybrid and C reference builds stay identical, with the new accessors local.

Activity

  1. added
    enhancement
    port
    ready
    on Nov 9, 2026
  2. rdoupe commented on Nov 9, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: the module list seam (obs-module-lists-seam.h / obs-module-lists-seam.c.h).

    1. RED: declare the accessors in libobs/obs-module-lists-seam.h (hidden, beside the module headers in libobs.pch.h), with stub bodies in libobs/obs-module-lists-seam.c.h in core+ ahead of obs-module-lists.c.h, and test/cmocka/test_module_lists_seam.c in the test graph, failing on the stubs.
    2. GREEN: each body copied from the line of obs-module-lists.c.h it wraps. No C caller changes; export sets identical on the C, hybrid and C reference builds, with the accessors local.

    Draft PR expected today.

  3. rdoupe commented on Nov 9, 2026

    @rdoupe
    CollaboratorAuthor

    Progress: the seam is done on fix/rust-port-add-the-module-list-se-710. It has two commits: cf75f07 (stubs, test_module_lists_seam fails 14/14) and 707c9ac (bodies, 14/14 on the C, hybrid and C reference builds). The export sets are unchanged (1767), with the 14 accessors local, and Tier 2 on Linux passes 822/822 on both libobs builds.

    I am holding the PR until the claim above is accepted. Its claim-bot run is still queued behind the runner backlog, so there is no assignment yet. Local rust-test fails only where master does (the mingw output pause probe, #4069), so the head is unstamped.

  4. moved this from In review to In merge queue in obs-rust Multiviewon Nov 9, 2026
  5. rdoupe commented on Nov 10, 2026

    @rdoupe
    CollaboratorAuthor

    Fixed by PR #4288 ("libobs: Add the module list seam"), merged through the merge queue: libobs/obs-module-lists-seam.h and libobs/obs-module-lists-seam.c.h (14 hidden accessors over the core's and a module's list fields), pinned by test_module_lists_seam (14/14 on the C, hybrid and C reference builds). No behaviour change and no Rust.

    What is left: the third step, porting libobs/obs-module-lists.c.h into rust/obs-core through these accessors, beside module_paths, module_names and module_load_rules. No issue for it exists yet; the extraction step is #4133, and the port issue will be filed from there. The tracking issue (#4) has no checkbox for this unit, so none was ticked.

  6. moved this from In merge queue to Done in obs-rust Multiviewon Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementportready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions