Skip to content

build: add opt-in Cargo/cc::Build OBS prototype - #1333

Merged
zackees merged 88 commits into
masterfrom
infra/cc-build-obs-sys
Oct 18, 2026
Merged

zackees merged 88 commits into
masterfrom
infra/cc-build-obs-sys

Conversation

@zackees

@zackees zackees commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Shipping scope

Ship the opt-in Cargo/cc::Build prototype and bundled obs-sys path. The existing CMake build remains the default. This PR does not claim the full CMake replacement, complete platform coverage or release packaging readiness.

The maintainer explicitly requested getting this code merged and doing follow-ups afterward. Additional C/Rust parity expansion is deferred to #1390; the complete native-build replacement remains tracked in #1332. Existing tests and public C headers are preserved.

Included

  • Typed native build/link orchestration, real dynamic libobs/plugin contracts, generated configuration, canonical source manifests, input invalidation and bundled obs-sys configuration.
  • Linux C/Rust libobs twins sharing common objects, dynamic plugins, OpenGL, Qt frontend/resources, recording/mux helpers, scripting, websocket, browser/CEF and the implemented encoder/capture/audio modules. This is a demonstrated selected-feature application, not a claim that every optional plugin is converted.
  • Unity on / compiled PCH off by default, with both optional. Real compiler cache reuse through soldr is measured; restored archives are not counted as compiler hits. PCH audit found18 requests/14 artifacts,14 initial compiler executions and0 on warm repeat;4 redundant cache requests remain a performance follow-up.
  • Existing CMake source selection consumes the canonical manifests where converted. No new GitHub workflow files.

Correctness changes included

Completed validation

Detailed commands, runtime artifacts, RED/GREEN commits, scope and limitations: docs/rust-port/cc-build.md.

  • Native shared core/plugin loading, rebuilt dependency/input invalidation and exact libobs twin export comparison; bundled obs-sys API/lifecycle checks.
  • Earlier completed app runs against both cores: staged OBS GUI, rendered browser/source/dock pixels, JavaScript/websocket behavior, saved configuration, frontend/API recordings and normal shutdown.
  • Existing selected test graph:52 core executables,6 VLC,1 graphics and2 standalone WHIP executables. Completed runs include104 core executions/832 reported cmocka cases,50 VLC cases,8 group-audio cases and8 standalone WHIP cases. These are separately scoped runs, not a claim of a single final-head full-suite pass.
  • WebRTC: all4 unity/PCH combinations each pass2 real H.264/Opus streams and4 recordings against both cores. Receiver validates decoded pixels, stereo48kHz1kHz tone, advancing timestamps, authenticated signaling/DELETE and cleanup. Original CMake module matches26 exports and passes the same separate reference run. Global HEVC-off streaming and recordings also pass.
  • Previous all-target/all-feature Clippy and read-only review pass; integration binary cap remains25/25. The latest documentation-scan false positive is fixed in26f33f149 with focused RED and all6 toolchain tests GREEN.

Current shipping checks

Required CI on26f33f149 PASS, including the final CI gate: run39097098398. The prior head passed Fast Gate, Qt, Windows/macOS Rust tests/cross lint/Tier2 and Linux ON, but failed the fixed documentation scan and the existing recording-shutdown race tracked in #1283. The focused regression correction is in #1392 (issue #1391), with deterministic RED/GREEN coverage and unchanged original tests. No tests are skipped/weakened or retried just to report green.

Final-head local shipping checks PASS on26f33f149: all-target/all-feature Clippy; both staged OBS variants with browser/VLC/WebRTC selected; actual browser pixels/JavaScript, websocket/profile/frontend recording and normal shutdown;4 additional validated API recordings;2 real decoded H.264/Opus WHIP streams with timestamps/tone/authenticated cleanup;8 unchanged standalone WHIP cases. The complete native invocation took440.60s including compilation and runtime checks, not a controlled build benchmark. Runtime directories: app-runtime-XGjhaF, app-runtime-7EQ8Pb. Prior failed/interrupted attempts are retained and not counted as passes. Required PR CI passed. This PR is ready and enqueued normally behind #1392; merge-queue validation is running: run39098913076.

Follow-ups

Refs #1332, #1385, #1390. The full conversion remains open under #1332.

Refs #1332. Both integration contracts fail because the shared-library backend is not implemented. Preserve the full application conversion and performance requirements in the build plan.
…EEN)

Refs #1332. Compile separate or unity C/C++ sources with cc::Build, link shared libraries with target-specific conventions and keep generated source paths explicit. Both native integration contracts and all-target clippy pass on Linux. Full libobs/application conversion remains in progress.
…RED)

Refs #1332. The bundled C API test fails at the explicitly unimplemented libobs backend. Move the existing source sets into a manifest shared with the CMake reference so the new native build does not maintain a divergent source list.
@zackees zackees changed the title build: migrate OBS native build to Cargo and cc::Build build: add opt-in Cargo/cc::Build OBS prototype Oct 18, 2026
@zackees
zackees marked this pull request as ready for review October 18, 2026 04:58
@zackees
zackees added this pull request to the merge queue Oct 18, 2026
Merged via the queue into master with commit fff3558 Oct 18, 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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant