Skip to content

build: add production Cargo application orchestration - #1725

Merged
zackees merged 20 commits into
masterfrom
infra/1332-application-driver
Oct 22, 2026
Merged

zackees merged 20 commits into
masterfrom
infra/1332-application-driver

Conversation

@zackees

@zackees zackees commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Scope

Refs #1332. Add a production Cargo command for the native Linux hybrid application, sharing its runtime staging with application validation. This PR does not complete #1332. CMake remains authoritative.

  • ./native-build build bootstraps obs-build through Soldr, then runs outside its process tree so the Rust archive build respects Soldr's reentrancy guard.
  • Build only the production hybrid core, frontend API, OpenGL renderer, Qt frontend, selected modules, FFmpeg helper, scripting and optional SDK-backed plugins. C reference binaries and compatibility probes are test-only.
  • Explicit Debug/Release/RelWithDebInfo/MinSizeRel native profiles; configurable core unity/PCH; fresh development runtime and application-build.json per invocation.
  • CMake and Cargo share frontend and Qt wrapper host source inventories. All 35 original CMake source calls retain their exact ordered inputs.
  • Relative Linux library lookup prefers the staged runtime over original build directories. The GUI test no longer injects LD_LIBRARY_PATH.
  • Enabled Tools and original C++ WebSocket plugins are included in the bundled module inventory.
  • Match existing native-consumer Rust compiler-cache bypass policy in both launch paths; standalone native C/C++ caching remains available.

RED → GREEN

The early draft was opened at 2681f83ae: real C profile switching in the existing application test category failed at Release (NDEBUG actual 0, expected 1). Subsequent RED contracts cover shared staging, command parsing, relative runtime core/plugin selection (652fd6f08), bundled frontend feature selection (0c7bc1901), and native Rust cache settings at both subprocess boundaries (27cd7bbdb). Each now passes.

Real application validation also exposed and fixed missing Qt host/frontend source groups, Soldr reentrancy and native SDK discovery, skipped bundled frontend plugins, and stale C-test build inputs. Existing C test sources/public headers and the WebSocket submodule are unchanged.

Verified locally

  • Production command built and staged the real Linux application. The exact command-produced runtime passed mapped-window startup, staged core/API/renderer and every selected module, saved scene, Lua/Python load/save/unload callbacks, screenshot, x264/AAC recording with white-frame/media checks, and normal shutdown.
  • Existing compatibility driver passed with both the explicit C reference and hybrid core: dynamic exports, source/module APIs, scripting, frontend Tools dialogs, original WebSocket wire checks, GUI, saved scene, recording and shutdown.
  • 63 selected unchanged C tests per core: 126 successful runs, with selected-core resolution checked for every executable. This is the selected Cargo manifest, not a claim of complete CTest coverage.
  • 21 native build contracts passed; additional bundled-feature and both cache-boundary contracts passed. All tests remain in existing Rust categories.
  • Full local ci/ self-test discovery passes: 934 tests, five environment-dependent skips. The initial PR self-test failure exposed two guards that still expected inline CMake source lists; these now verify the shared inventories, with actual CMake configuration checks for all three Qt wrapper host selectors.
  • Focused Clippy with libobs integration/all targets and warnings denied passes; formatting and whitespace checks pass.

Runtime evidence is retained in the bounded obs-cargo-application-build-03ce5a7a87e5 volume. Production runtime: /build/application/relwithdebinfo/runtimes/1792652434341437492-8; compatibility runtimes: /build/compatibility/app-runtime-26aoBw and app-runtime-Hertej. Logs: /tmp/obs-1332-application-build.log, /tmp/obs-1332-application-compatibility.log, and focused RED/GREEN logs. Validation used the existing bounded Docker harness with FFmpeg and an Openbox/Xvfb/D-Bus session; their required packages are in the existing shared dependency list.

Pre-push review: one reviewer across all buckets and follow-up fixes; final verdict clean.

The first native Windows Tier 2 run exposed a raw shader-byte assumption in the unchanged test_video_output_plan test: Git's Windows CRLF conversion prevented its LF-delimited technique lookup. e9790f87a reproduces this with an actual Windows-style Git checkout; dc7c6ac30 pins .effect resources to LF. Shader source and C tests remain untouched. The checkout regression plus related guards pass (24 tests); native Windows Tier 2 confirms the original test passes in the CMake reference/hybrid and Cargo reference/hybrid configurations.

PR CI run 39745867584 passed with CI Gate ✅ on dc7c6ac30: Fast Gate, formatting/self-tests, Qt frontend, Linux C-test modes, Windows/macOS Rust tests and native Tier 2, and Windows/macOS cross lint. The macOS native job completed successfully after 20m24s; the observation timeout did not stop or restart it.

Remaining acceptance for #1332

Full macOS/Windows application orchestration, all configurations/architectures and production feature parity (including NVENC selection), complete canonical test/build inventories, controlled cold/warm/no-change/edited-input native-cache and unity/PCH measurements, release metadata/layout, and packaged artifacts run with representative saved capture profiles remain open. Component coverage from earlier PRs and this Linux development runtime are progress, not evidence of all-platform/package completion.

@zackees
zackees marked this pull request as ready for review October 22, 2026 08:43
@zackees
zackees added this pull request to the merge queue Oct 22, 2026
Merged via the queue into master with commit 7c2c3c9 Oct 22, 2026
27 checks passed
Comment thread native-build
# Bootstrap the Rust build tool, then enter it outside Cargo/Soldr's process tree.
set -euo pipefail
repository=$(cd "$(dirname "$0")" && pwd)
build_host=$(soldr --no-timestamp-lines rustc -vV | sed -n 's/^host: //p')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is LLM cruft. rustc --print host-tuple does the same job as this mess, but even then you don't need to put it in a var. Just change the later cargo invocation to cargo build --target host-tuple.

@alerque

alerque commented Oct 22, 2026

Copy link
Copy Markdown

For the sake of distro packagers everywhere and general ease of getting end users up to speec, please make sure not to hard code the build process around soldr. Of course you're welcome to use it to speed up your dev workflow and/or CI, but the project needs to be buildable without it with plain cargo too.

chriscoveries pushed a commit to chriscoveries/obsrust-fork that referenced this pull request Oct 22, 2026
* ci: RED: the macOS presets must not use upstream's Sparkle update feed

* build: Stop the macOS app from using upstream OBS Studio's update feed

* docs: Add the macOS update feed fix to the features ledger

* ci: RED: updaters must offer only certified obs-rust releases (obs-rust#1729, obs-rust#1730, obs-rust#1736)

The daily beta must be a pre-release; only a maintainer's certify dispatch
makes a full release (Latest). Both updaters stay on and read
releases/latest/download/ on obs-rust/obs-studio: Sparkle appcasts, an
RSA-signed Windows manifest and branches.json written by ci/update_feed.py.

21 failures: no certify job, daily releases are marked Latest, no
ci/update_feed.py or obs-rust-update.hpp, the feed URLs and RSA key are
upstream's or empty, the upstream appcast jobs remain in publish.yaml.

* frontend: Update from certified obs-rust releases (obs-rust#1729, obs-rust#1730, obs-rust#1736)

Daily betas are now GitHub pre-releases. A maintainer certifies one with
'gh workflow run release-rust.yaml -f certify=<tag>': the certify job checks
the assets against SHA256SUMS, writes the update feed with ci/update_feed.py
(EdDSA-signed Sparkle appcasts, RSA-signed manifest.json and branches.json),
uploads it, and then makes the release a full release marked Latest.

Both updaters stay on and read
github.com/obs-rust/obs-studio/releases/latest/download/, which resolves only
to certified releases. macOS: Sparkle feed and key are obs-rust's (from
versions (obs-rust-update.hpp), downloads the release ZIP, checks its SHA-256
and installs it after OBS exits; upstream's CDN updater.exe is no longer built.
Upstream's appcast jobs are removed from publish.yaml.

* docs: Link the certified-release updater ledger entry to obs-rust#1742

* frontend: clang-format obs-rust-update.hpp

* ci: Find the Windows updater in the WINDOWS source set (obs-rust#1725 layout)
@zackees
zackees deleted the infra/1332-application-driver branch October 26, 2026 15:45
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