Repository navigation
Closed
Labels
enhancementNew feature or requestportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimable
Description
Unit
libobs/obs-module-lists.c.h (live C in libobs.core+) to rust/obs-core, new module module_lists: the ten module list calls, all EXPORT in obs.h and kept under their names.
obs_log_loaded_modules;obs_module_add_source,obs_module_add_output,obs_module_add_encoderandobs_module_add_service;obs_find_module_fileandobs_module_get_config_path;obs_add_module_path;obs_add_safe_moduleandobs_add_disabled_module.
Phase and position
Phase 6 (libobs core), tracker #444; tracking issue #4. The third of three steps for the module list calls: after their extraction (#4133, merged as #4139) and the module list seam (#4219, merged as #4288), beside the module rules that are already Rust (module_paths, module_names, module_load_rules).
Dependencies and existing tests
- None open: the seam (libobs: Add the module list seam #4288) is on master.
test/cmocka/test_module_lists.c(the characterization from libobs: Extract the module list calls #4139) andtest/cmocka/test_module_lists_seam.c(libobs: Add the module list seam #4288) are the Tier 2 tests; Tier 1 portstest_module_lists' assertions 1:1.- The
module_paths,module_names,module_load_rulesandmodule_register_copyparity tests stay as they are.
Notes
- Every field and list goes through the seam (
obs-module-lists-seam.h); the shim never mirrorsstruct obs_coreorstruct obs_module. It does mirrorstruct obs_module_path(with a layout test) for themodule_pathspush. - The lists own their strings, and
free_moduleand the core's shutdown free them withbfree, so the shim copies withbstrdupand pushes withdarray_push_back, never with Rust's allocator. obs_module_add_source(module, NULL)pushes a NULL entry today; that stays.- None of the calls takes a lock today; the port adds none.
- One intentional difference:
obs_log_loaded_modulesreadsobs->first_modulewithout checkingobs, while the calls beside it check it, so a frontend or script that calls it beforeobs_startupor afterobs_shutdowncrashes on a NULL read. The port returns without logging when there is no core. It is listed in the Tier 3 test and inrust/README.md, and the parity test leaves out exactly that input.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimable
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Nov 10, 2026
Claiming: the port of the module list calls (
libobs/obs-module-lists.c.h) torust/obs-core, new modulemodule_lists.rust/obs-core/tests/obs_core/module_lists.rsagainst atodo!()core:test_module_lists' assertions 1:1 over a model core, the NULL cases, and the call with no core.module_pathsandmodule_namescores directly.bstrdupand pushing withdarray_push_back, with a layout test forstruct obs_module_path.obs-module-lists.c.hfromlibobs.core+into its own ported group, and run the Tier 2 tests on the C, hybrid and C reference builds, with identical export sets.The encoder registration's short-structure
capsread was checked as part of this batch: it is already covered bytest_encoder_short_scaling_caps(test_register_short_info.c) andtest_encoder_sizes(module_register_copy), so no issue is filed for it.Draft PR expected today.
obs-core: Test the module list calls port
obs-core: Port the module list calls core
obs-core: Swap in the module list calls
obs-core: Compare the module list calls with the C
docs: Record the module list calls port
obs-core: Test the module list string reads
obs-core: Read module list strings past guards
obs-core: Compare module list bytes exactly
docs: Note the module list string reads
obs-core: Test the module list calls port
obs-core: Port the module list calls core
obs-core: Swap in the module list calls
obs-core: Compare the module list calls with the C
docs: Record the module list calls port
obs-core: Test the module list string reads
obs-core: Read module list strings past guards
obs-core: Compare module list bytes exactly
docs: Note the module list string reads
obs-core: Port the module list calls (obs-rust#4467)
rdoupe commentedon Nov 10, 2026
Fixed by the PR that ports the module list calls to
rust/obs-core(#4467), merged through the merge queue. All ten calls (obs_log_loaded_modules, the fourobs_module_add_*,obs_find_module_file,obs_module_get_config_path,obs_add_module_path,obs_add_safe_module,obs_add_disabled_module) now run in Rust in hybrid libobs;obs-module-lists.c.hmoved into its own ported group and the C reference keeps the C.Left: nothing for this unit. The one intentional difference (
obs_log_loaded_modules()returns without logging when there is no core, where the C crashed) is in the parity test header,rust/README.mdand the Phase 6 tracking issue (#444). No follow-up issue is needed.