Skip to content

rust: Fold obs-scene-bounds and obs-scene-blend into obs-scene - #1616

Merged
zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:rust/obs-scene-crate
Oct 21, 2026
Merged

zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:rust/obs-scene-crate

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Refs #444

What and why

The mechanical PR the crate decision on #444 asks for: one rust/obs-scene crate with a module per extracted file, as obs-hotkey already does for its three files. obs-scene-bounds and obs-scene-blend (#1543) were the only per-file crates, and obs-scene.c.h will yield more units, which now go in as modules.

Behaviour-neutral. Files moved with git mv, so history follows; the only code edits are use paths. The C oracle, the C tests and the C sources are unchanged.

Was Now
rust/obs-scene-bounds/src/fit.rs (obs_scene_bounds::fit) rust/obs-scene/src/bounds.rs (obs_scene::bounds)
rust/obs-scene-blend/src/blend.rs (obs_scene_blend::blend) rust/obs-scene/src/blend.rs (obs_scene::blend)
rust/obs-scene-bounds/src/ffi/scene_bounds.rs rust/obs-scene/src/ffi/scene_bounds.rs
rust/obs-scene-blend/src/ffi/scene_blend.rs rust/obs-scene/src/ffi/scene_blend.rs
rust/obs-scene-bounds/tests/scene_bounds/{main,parity}.rs rust/obs-scene/tests/scene/bounds/{mod,parity}.rs
rust/obs-scene-blend/tests/scene_blend/{main,parity}.rs rust/obs-scene/tests/scene/blend/{mod,parity}.rs
libobs-rust: deps on both crates, re-exports scene_bounds_ffi, scene_blend_ffi dep on obs-scene, re-export scene_ffi (obs_scene::ffi)
obs-data/tests/core.rs: two #[path] includes one, obs-scene/tests/scene/main.rs
naming.md: two rows libobs/obs-scene*.c.h → rust/obs-scene

Also updated: Cargo.lock, the obs-data dev-dependencies, the rust/README.md crate and port rows, and the obs-tests-core row in testing-policy.md. The workspace members are the rust/* glob, and no ci/*.py check, obs-build manifest or source-sets.json entry names these crates (the source-sets.json and obs-build entries name the C files, which stay). rust-exports.d has no file to rename: both shims are hidden (rust-hidden.txt), so neither crate had a fragment.

RED → GREEN

  • RED commit: not applicable (mechanical move, no behaviour change). The evidence is the tests unchanged in count and name.
  • GREEN (fd55b4011), headless (private Xvfb, private D-Bus, fresh HOME):
Check Before (master c96d2738d) After
obs-tests-core, blend Tier 1 + Tier 3 (scene_blend::* → scene::blend::*) 16 passed 16 passed, same test names
obs-tests-core, bounds Tier 1 + Tier 3 (scene_bounds::* → scene::bounds::*) 14 passed 14 passed, same test names
obs-tests-core, whole binary 340 passed 340 passed
test_scene_blend / test_darken_transparent / test_scene_bounds_fit / test_group_empty_bounds / test_ws_transform_bounds, C and Rust lanes, against libobs and libobs-with-rust 6 / 2 / 11 / 18 / 4 passed in all four, none skipped
Exported symbols (nm -D), libobs and libobs-with-rust in both lanes 1766 each, all four lists identical
obs_bounds_fit_scale, obs_blend_mode_params in libobs-with-rust still local (hidden), both from the obs_scene object in the staticlib
ci/local_gate.py lanes lint (140/140 ci/test_*.py), cross, cross-release, rust-test all ok
Rust test binaries (ci/test_binary_cap.py --report) 8 8
  • Real app (UI, protocol output or logging changes): not applicable, no user-visible change.

Checklist

  • Base is master (or the description starts with a Stacked: note)
  • I claimed the issue, or no one else has an open PR for it (requested by the coordinator on meta: Phase 6 libobs core migration through opaque C seams #444)
  • Characterization test (if the unit had none), then RED, then GREEN commits (not applicable: a move, the tests exist)
  • User-visible change: its line in docs/features.md is added or updated (not applicable: no user-visible change)
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite (lanes passed locally; not stamped)
  • Warning or flag changes (-W..., ratchets): built with scripting ON (a flag change under cmake/ or build-aux/ runs the full builds) and cross-checked with clang and MSVC (not applicable)
  • Intentional differences from C listed in the parity test header and rust/README.md (ports) (not applicable: none, unchanged)

The crate decision on obs-rust#444: a libobs area gets one crate named after it,
with a module per extracted file, as obs-hotkey already does for its
three files. obs-scene-bounds and obs-scene-blend were the only per-file
crates, and obs-scene.c.h will yield more units, so both move into one
rust/obs-scene crate and later obs-scene units go in as modules.

Mechanical and behaviour-neutral. The safe cores become
obs_scene::bounds (was obs_scene_bounds::fit) and obs_scene::blend, the
C ABI shims stay ffi::scene_bounds and ffi::scene_blend, and libobs-rust
re-exports obs_scene::ffi. The Tier 1 and Tier 3 tests move to
obs-scene/tests/scene and still run in obs-tests-core, with the same
cases. No symbol changes: both shims stay hidden, so rust-exports.d
gets no fragment. The C oracle and the C tests are unchanged.

Refs obs-rust#444
@rdoupe
rdoupe requested a review from zackees as a code owner October 21, 2026 10:19
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into obs-rust:master with commit 2aba69a Oct 21, 2026
25 checks passed
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.

2 participants