Skip to content

obs-core: Port source-type enumeration to Rust (Refs #4781) - #4897

Merged
zackees merged 3 commits into
masterfrom
port/4781-source-type-enum-land
Nov 16, 2026
Merged

zackees merged 3 commits into
masterfrom
port/4781-source-type-enum-land

Conversation

@zackees

@zackees zackees commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Refs #4781.

Port obs_enum_source_types and obs_enum_input_types2 from the extracted source-type enumeration unit to obs-core. The safe core preserves insertion order, full-width bounds, borrowed pointer identity, untouched failure outputs, independently optional input outputs and unversioned-last writes when outputs alias. Thin ABI shims use real private C field adapters and the existing core accessor. The original C remains in its own reference-only group and the differential oracle. Legacy enumeration and metadata queries retain their existing implementations.

Resumes the existing branch's three commits with authorship preserved, rebased by replay onto current master after prerequisite #4884. RED 9baaf088a fails both characterization mirrors at todo!(). GREEN cd2a5fbde implements the swap; df3346e54 preserves the shared original input-ID fixture pointer. Existing C tests, public headers and the WebSocket plugin are unchanged. No intentional behavior differences; Tier 4 is inapplicable because this unit exposes no network protocol.

Validation:

  • Full core-state category: 5,717 passed, five existing ignored tests; focused new coverage: five passed, including the isolated original-C differential test and real-header scalar measurements.
  • Mutation check: suppressing the source output write makes the differential test fail; restored implementation passes.
  • Application category native_build::: 277 passed. No new Rust test executable; category inventory stays at eight.
  • Unchanged test_source_type_enum and test_source_registration pass against both hybrid libobs and libobs-c-reference. Loader resolution was checked for each backend; all 1,768 dynamic exports match exactly. The broad local Tier 2 build was stopped and its configured tree reused for these focused targets; complete suites remain in hosted CI.
  • soldr cargo fmt --all --check, git diff --check, and the single full ./lint run pass (lane lint: ok, 351.2 seconds). One read-only clud-review reviewer found no material issues.

Test cost: 25 debug runs per new module at reduced parity; longest Tier 1 run 0.0109 s, differential/layout module 0.0250 s; peak child RSS 21,372 KiB. No own worker threads; parity re-execs one isolated child.

Attestation: ./push published the GREEN head but stamped no Ci-Attestation trailers. CI-pinned soldr 0.9.45 failed its client Dylint bootstrap with catalogue has no asset row for zackees/soldr-toolchain assets/rust-nightly-versions.v1.json; prooft reported nothing attested. Ordinary selected PR CI and the required merge-queue gate remain enabled. Native Windows/macOS execution was not run locally.

@zackees zackees changed the title test(obs-core): mirror source-type enumeration against Rust stubs (Refs #4781) obs-core: Port source-type enumeration to Rust (Refs #4781) Nov 16, 2026
@zackees
zackees marked this pull request as ready for review November 16, 2026 18:08
@zackees
zackees enabled auto-merge November 16, 2026 18:09
…#4781)

Ci-Attestation: {"at":1794853801,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":117,"stamp":"00ea9efc8c2160d6ee3d2a05478e16ba","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853801,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":117,"stamp":"ea9a0e50e911c192bb2bde1675e45d79","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853801,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":117,"stamp":"e070e1f967eb20d3af3d317021c57949","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853801,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":117,"stamp":"b7082551f0830fc07df9591f60e13d4e","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"general/all/client-lint","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"70dce89eb5e62b4f48a82cc13e5937cf","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853801,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":117,"stamp":"de4ba8d29143935850336a94316ef748","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853683,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"58f9bbf8c8202a2674cb5310d0dac1c9","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853683,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"f099746cf237880f51ce3cfdfbb0c35d","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"f8a12934bcaccf8b43cdfce22ed8c029","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"2ba1b4f1b27223759badd2818939ae4b","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"0b42789733718f700a1e1863728f4649","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"86614b37b802169180b617c2eaaaaeaf","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"eedcb3f6ed74b9b85166a1418468af62","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853683,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"fd4e6061f2159a23c720e0cb24a9bb06","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"6373fea53e8a68e8f91ea5cf66b4f6d6","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"88acdf2c28cc1f33ba6c9dbcc44eaa27","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"5993703d2e309a318de7aa3e71a3aa2e","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794853682,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"3cd860999a35d54c14254d8904a74f2d0cbbec4d086691a7e6ee8d817bbe72b2","lane":"client-lint","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":644,"stamp":"9c03b348d7439e208b1198e4783457ab","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}
Ci-Attestation: {"at":1794854576,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"ed38d4edde646a3800712bc910c6f37bb7df4a9004815f3b7346a656cb942c2f","lane":"client-test-x86_64-unknown-linux-gnu","parents":["cd2a5fbde02c5728097f5bb2adc4404409540825"],"secs":773,"stamp":"83e6513a34490768b21f4d36b40c0b47","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"94fa7ce85868c3604cf8fd31a458a4cf641061c7","coverage":"all-tracked-applicable-files","diff":["libobs/build/libobs.core-source-type-enum+.h.c","libobs/build/libobs.ported-source-type-enum+.h.c","libobs/build/ported-source-sets/source-type-enum.json","libobs/cmake/rust-exports.d/obs-core-source_type_enum.txt","libobs/obs-source-type-enum-fields.c.h","rust/README.md","rust/obs-c-oracle/oracle/source_type_enum.c","rust/obs-core/src/ffi/mod.rs","rust/obs-core/src/ffi/source_type_enum.rs","rust/obs-core/src/lib.rs","rust/obs-core/src/source_type_enum.rs","rust/obs-core/tests/obs_core/main.rs","rust/obs-core/tests/obs_core/source_type_enum.rs","rust/obs-core/tests/obs_core/source_type_enum_parity.rs","test/cmocka/source-type-enum-link-support.c","test/cmocka/tests.d/source_type_enum_link_support.cmake"],"head":"ccbcfb5a7ba483353e6dfe6e1d9813961d3a79e0","tools":{"orchestrator-python":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]","schema-dependencies":"3.13.15 (main, Aug 14 2026, 15:34:59) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"34711accac97c8b4343efb97d4f5a7245fdff945d9351f19cfb8e1bc5861e294","tree":"4f249e0f93319d9c3ec3bc06aab476ea90aa239e"}}
@zackees
zackees force-pushed the port/4781-source-type-enum-land branch from df3346e to bf87e8e Compare November 16, 2026 19:01
@zackees
zackees added this pull request to the merge queue Nov 16, 2026
Merged via the queue into master with commit 6367394 Nov 16, 2026
38 checks passed
@zackees
zackees deleted the port/4781-source-type-enum-land branch November 16, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant