Skip to content

obs-core: swap obs_get_main_canvas to Rust delegation (Refs #4780) - #4785

Merged
zackees merged 2 commits into
masterfrom
port/4780-get-main-canvas
Nov 13, 2026
Merged

zackees merged 2 commits into
masterfrom
port/4780-get-main-canvas

Conversation

@zackees

@zackees zackees commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

obs_get_main_canvas delegates through a safe Rust core and thin ABI shim to the existing canvas reference operation. A private C adapter borrows the current main-canvas field; the shim acquires its reference exactly once and returns the result unchanged. Refs #4780; prerequisite #4784 has merged.

Replayed only RED e273726e14f46a320ed62f238b4032f6c2e54cb1 and GREEN 65f7421dcf21efbbb3c6d64cc43216d126fd1db2 onto master be2810c481857c3456e83401bd4dc97c5a5e0eeb, after sibling #4803 merged and caused the queue ejection. New RED: 0dc63d00d; new GREEN: ea98f03a3287ce5dd22a12c793e4b6ec377b13a1. The sole conflict resolution preserves obs-enum-scenes.c.h alongside the main-canvas field adapter, sorted. All Rust registrations and export fragments remain intact. Range-diff shows only this context change. The new unity group was staged and committed before build-group inventory. The exact replaced remote head is 65f7421dcf21efbbb3c6d64cc43216d126fd1db2.

The original RED's four safe characterization counterparts failed at the intended stub. GREEN adds an original-C oracle and real C-layout measurements, comparing callback counts, reference/weak-reference effects, returned identities and complete fixture bytes. The original mutation check skipped acquisition and killed both differential behavior tests while layout still passed. Test cost (original measurement): 25 reduced-parity module runs, longest 0.070 s, peak RSS 18,580 KiB, no own threads.

Fresh replay validation: all seven safe/layout/differential get_main_canvas tests passed in the existing obs-tests-core binary with OBS_PARITY_CASES=reduced and SOLDR_RUSTC_WRAPPER=none. Whitespace validation passed.

Fresh Tier 2 replay rebuilt actual hybrid libobs and libobs-c-reference. Unchanged test_get_main_canvas, test_get_output_source, test_set_output_source, test_object_ref and test_canvas_signals each passed five repeats against each library (50 suite executions). Loader assertions verified both intended library paths. Dynamic symbol sets match exactly (1,768 each). Warm CMake configure took 56.8 seconds.

One full repository SOLDR_PORCELAIN=0 ./lint passed on the replayed tree: exit 0, final lane verdict ok (155.4 seconds). The report parser returned unknown, so the command status and final lane result were checked directly. Soldr reused matching passing verdicts for unchanged clippy inputs.

The prerequisite C characterization and extracted body remain unchanged. Standalone Rust-static consumers link the real private adapter; the original implementation belongs to its reference-only unity group. No existing C test, public C header, WebSocket plugin, workflow, shared test graph, native test list or Rust executable changes. This behavior-preserving port needs no features-ledger line.

No intentional behavior differences. Uninitialized core, dead canvases and overflowing reference counts remain excluded C precondition violations. Tier 4 is inapplicable. The full Tier 2 suite, native Windows/macOS runtime, sanitizers and a fresh mutation run were not run locally; ordinary hosted PR and merge-queue CI remain the merge gates.

Published head: ea98f03a3287ce5dd22a12c793e4b6ec377b13a1. Publication used the unchanged ./push entry point with an exact --force-with-lease=refs/heads/port/4780-get-main-canvas:65f7421dcf21efbbb3c6d64cc43216d126fd1db2. Installed prooft still rejects master's newer data and swift gate ecosystems before running client proof, so the normal fallback published without complete signed client evidence. No toolchain, permissions, attestation policy or source workaround was made; ordinary hosted checks remain required.

@zackees
zackees marked this pull request as draft November 12, 2026 23:56
@zackees zackees changed the title test(obs-core): pin main-canvas acquisition against a stub (RED, Refs #4780) obs-core: swap obs_get_main_canvas to Rust delegation (Refs #4780) Nov 12, 2026
@zackees
zackees changed the base branch from master to test/4779-get-main-canvas-extract November 12, 2026 23:56
Base automatically changed from test/4779-get-main-canvas-extract to master November 13, 2026 00:17
@zackees
zackees force-pushed the port/4780-get-main-canvas branch from 481c01c to 04eec75 Compare November 13, 2026 01:47
@zackees
zackees marked this pull request as ready for review November 13, 2026 01:53
@zackees
zackees enabled auto-merge November 13, 2026 01:53
@zackees
zackees added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 13, 2026
@zackees
zackees enabled auto-merge November 13, 2026 02:39
@zackees
zackees force-pushed the port/4780-get-main-canvas branch from 04eec75 to 65f7421 Compare November 13, 2026 02:41
@zackees
zackees added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 13, 2026
@zackees
zackees added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 13, 2026
@zackees
zackees force-pushed the port/4780-get-main-canvas branch from 65f7421 to ea98f03 Compare November 13, 2026 05:13
@zackees
zackees enabled auto-merge November 13, 2026 05:14
@zackees
zackees added this pull request to the merge queue Nov 13, 2026
Merged via the queue into master with commit c41788c Nov 13, 2026
41 checks passed
@zackees
zackees deleted the port/4780-get-main-canvas branch November 13, 2026 06:35
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 13, 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