Skip to content

obs-core: swap obs_set_output_source to Rust delegation (Refs #4709) - #4732

Merged
zackees merged 2 commits into
masterfrom
port/4709-set-output-source
Nov 12, 2026
Merged

zackees merged 2 commits into
masterfrom
port/4709-set-output-source

Conversation

@zackees

@zackees zackees commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

obs_set_output_source now forwards through a safe Rust core and a thin C ABI shim, preserving the existing canvas setter's signals, bounds behavior and source references. A private adapter borrows the current main canvas without changing ownership. Refs #4709. The characterization and verbatim extraction prerequisite landed in #4726.

The original RED commit added four safe Rust tests against a todo!() stub and observed all four fail; GREEN implements exact delegation and adds the original-C differential oracle. The existing C wrapper remains unchanged in its reference-only unity group. Standalone Rust-static consumers link the real adapter.

Rebased only this PR's RED/GREEN commits from 24d6fd9fec6efc693ecf947dbf4f12462f767586 onto master 1273c7ea21c9c6fae1ba7bb3ba7425429dfebc56. The only conflict was in libobs/build/libobs.core+.h.c: retained master's raw-audio-remove include and this port's output-source field adapter. Range-diff confirms no functional change; all other shared registrations merged cleanly.

Rebase validation: SOLDR_PORCELAIN=0 OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core set_output_source -- --nocapture passed all seven Tier 1/Tier 3/layout tests. Rebuilt both actual libraries and replayed unchanged test_set_output_source, test_object_ref and test_canvas_signals five times each against each library: 30 suite executions, zero failures. Verified both loaded library paths and identical sets of 1,768 dynamic exports. Exactly one full SOLDR_PORCELAIN=0 ./lint passed, exit 0, 371.6 s. git diff --check passed.

Before this rebase, the prior worker also verified all 275 native-build registration tests plus two child checks, and linked all eight Windows MSVC category test binaries. Those checks were not repeated for this conflict-only rebase. The original mutation check (changing the delegated channel) made both differential behavior tests fail. Test cost measured there: longest module <0.009 s, peak RSS 18,240 KiB over 25 reduced-parity runs, no own threads. Tier 4 does not apply to this non-protocol wrapper. Full Tier 2, native Windows/macOS runtime and sanitizers were not run locally.

No existing C test, public header, WebSocket plugin, workflow, shared test graph or native test list is changed. No new Rust test executable or user-visible behavior change. Hosted CI remains the merge gate.

@zackees
zackees marked this pull request as ready for review November 11, 2026 19:05
@zackees
zackees enabled auto-merge November 11, 2026 19:05
Ci-Attestation: {"at":1794514944,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["b3d542a2993d4e345c489f4e28e1dba370817f16"],"secs":366,"stamp":"8369ab515d4b4c8170ca42f2f7f21108","tree":"8c69c4b2a5eed183cce8d5abbb5046ee8674cc30","v":1,"via":"run"}
Ci-Attestation: {"at":1794514944,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["b3d542a2993d4e345c489f4e28e1dba370817f16"],"secs":366,"stamp":"3ba7424850df160f2c19f4bdbbfa8a12","tree":"8c69c4b2a5eed183cce8d5abbb5046ee8674cc30","v":1,"via":"run"}
Ci-Attestation: {"at":1794514944,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["b3d542a2993d4e345c489f4e28e1dba370817f16"],"secs":366,"stamp":"db2707619941265e879811514212632e","tree":"8c69c4b2a5eed183cce8d5abbb5046ee8674cc30","v":1,"via":"run"}
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