Skip to content

feat(obs-core): swap common object strong ownership to Rust (Refs #4668) - #4672

Merged
zackees merged 3 commits into
masterfrom
port/4668-object-ref
Nov 11, 2026
Merged

zackees merged 3 commits into
masterfrom
port/4668-object-ref

Conversation

@zackees

@zackees zackees commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

obs_object_get_ref and obs_object_release now use the Rust obs-core implementation and existing atomic reference helpers, preserving the libobs API/ABI, NULL and shutdown guards, stored identity, expiry, and destroy-before-weak-release ordering.

Refs #4668. Rebuilt on master after prerequisite #4669 squash-merged: cherry-picked only the swap commits d9ed5e45 and 264546c8, as fa404b510 (RED) and 4805cc83a (GREEN). git range-diff confirms unchanged patches; no prerequisite pre-squash commits are included.

RED evidence from the original worker: all four safe characterization cases failed at the committed todo!() stubs. GREEN validation rerun on the rebuilt branch:

  • All six focused Rust Tier 1 and original-C differential/layout tests passed.
  • Unchanged test_object_ref, test_source_module, and test_module_lists passed three repeats each against hybrid libobs and libobs-c-reference: 18 suite runs. All 1,767 dynamic exports match.
  • All 277 native build tests passed.
  • Windows MSVC workspace test link check passed for all eight category binaries, including the oracle. Host lld-link emitted a libxml2 version-metadata warning; no missing or duplicate symbols.

The original worker also recorded a mutation failure when suppressing final destruction, then restored the implementation and verified GREEN. No intentional differences. Tier 4 does not apply to these object lifetime APIs. No existing C test, public C header, WebSocket plugin, workflow, graph, or native test registration was changed.

Test cost (original worker, 25 debug runs per module): Tier 1 <0.01 s / 14,888 KiB peak RSS; differential/layout 0.01 s / 17,676 KiB. No own threads; process-global parity probes re-exec the existing category binary. No new Rust executable. Full workspace execution, full Tier 2, sanitizers, and Windows/macOS native execution were not rerun locally.

Full SOLDR_PORCELAIN=0 ./lint passed once (353.2 s, exit 0, final lane status ok). git diff --check passed.

Published with ./push; prooft attested format, host Clippy, and host Dylint on final head 6c7bf3bc25b634a1b581bf85effbb4238d900053. The attestation changes only the GREEN commit message.

Ci-Attestation: {"at":1794378435,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["fa404b51068ed83c411e7a35c85e200e6f216d32"],"secs":553,"stamp":"5b57746ec402933e4b273c03a232327e","tree":"b69419e1f4bf9e394b882bc3ba1a233bd647efe6","v":1,"via":"run"}
Ci-Attestation: {"at":1794378435,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["fa404b51068ed83c411e7a35c85e200e6f216d32"],"secs":553,"stamp":"e488e7c2bbea4e2e6740fd2555ca38fc","tree":"b69419e1f4bf9e394b882bc3ba1a233bd647efe6","v":1,"via":"run"}
Ci-Attestation: {"at":1794378435,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["fa404b51068ed83c411e7a35c85e200e6f216d32"],"secs":553,"stamp":"b3bc124431aa5b14ed01715a611907ff","tree":"b69419e1f4bf9e394b882bc3ba1a233bd647efe6","v":1,"via":"run"}
Refs #4668. Windows Rust Tests job 130368584323 passed every test, then failed Clippy on four identity conversions from i32 to Windows C long. Reproduced with Windows-target obs-tests-core Clippy before fixing the fixture and generated count ranges to use the native-long type directly. Preserve all assertions and generated value bounds.

Ci-Attestation: {"at":1794383148,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["d06571f73bba1d943406430cfed38ff10f24e040"],"secs":180,"stamp":"561b7137f101792e28c215eb2ec814d7","tree":"204eb0f48b3f0e42523fc2d3ee7203584e19e710","v":1,"via":"run"}
Ci-Attestation: {"at":1794383148,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["d06571f73bba1d943406430cfed38ff10f24e040"],"secs":180,"stamp":"9c1463f8b8cad955a5b54cfd51328c5b","tree":"204eb0f48b3f0e42523fc2d3ee7203584e19e710","v":1,"via":"run"}
Ci-Attestation: {"at":1794383148,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["d06571f73bba1d943406430cfed38ff10f24e040"],"secs":180,"stamp":"4ada99aa40de836de22116bae713fc43","tree":"204eb0f48b3f0e42523fc2d3ee7203584e19e710","v":1,"via":"run"}
@zackees
zackees force-pushed the port/4668-object-ref branch from 6c7bf3b to 1159308 Compare November 11, 2026 07:45
@zackees
zackees added this pull request to the merge queue Nov 11, 2026
Merged via the queue into master with commit 168de97 Nov 11, 2026
75 of 77 checks passed
@zackees
zackees deleted the port/4668-object-ref branch November 11, 2026 09:00
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 11, 2026
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