Repository navigation
rust: Port session D-Bus sleep inhibitor to obs-util - #1577
Merged
Merged
Conversation
This was referenced Oct 21, 2026
Member
Author
zackees
force-pushed
the
port/platform-nix-dbus
branch
3 times, most recently
from
October 21, 2026 17:22
ded2ee6 to
497b5f6
Compare
zackees
marked this pull request as ready for review
October 21, 2026 17:39
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 21, 2026
zackees
force-pushed
the
port/platform-nix-dbus
branch
from
October 21, 2026 18:12
497b5f6 to
fd3183e
Compare
zackees
enabled auto-merge
October 21, 2026 18:13
zackees
force-pushed
the
port/platform-nix-dbus
branch
from
October 21, 2026 20:41
fd3183e to
90987d5
Compare
target_sources(libobs ...) compiled util/platform-nix-dbus.c into the hybrid libobs next to the Rust dbus_* symbols, failing the link. Use obs_libobs_add_c_sources like the other ported source sets.
7 of 11 tasks
This was referenced Oct 22, 2026
chriscoveries
pushed a commit
to chriscoveries/obsrust-fork
that referenced
this pull request
Oct 22, 2026
* test: Check obs-util's gio-2.0 probe on cross targets Since the session D-Bus inhibitor port (obs-rust#1577), obs-util's build script requires gio-2.0 through pkg-config whenever the `gio` feature is on, also for a cross target. libobs-rust turns that feature on by default, so the release gate's `cross-release` lane, which lints the workspace for aarch64-unknown-linux-gnu, now fails: soldr's aarch64 sysroot has no GIO. Move the probe decision unchanged into build/gio.rs so it can be unit tested, and add Tier 1 cases: a native Linux build still requires GIO, a cross build must not. The cross case fails. Refs obs-rust#1688 * rust: Let obs-util's gio-2.0 probe warn on cross targets The session D-Bus inhibitor port (obs-rust#1577) made obs-util's build script probe gio-2.0 through pkg-config and panic without it. The Rust inhibitor declares GIO's functions itself, so the probe only adds link flags. That is needed natively, where Cargo links the test binaries against GIO, but not for a cross target: the cross gates only lint or build the staticlib, and CMake links hybrid libobs with gio::gio itself. soldr's aarch64 Linux sysroot has no GIO, so the release gate's cross-release lane failed at obs-util's build script. A cross build now still probes gio-2.0 and uses it when found, and otherwise prints a Cargo warning instead of failing. A native build is unchanged: it requires GIO. Fixes obs-rust#1688
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1576
Port the Linux and FreeBSD session D-Bus sleep inhibitor from
libobs/util/platform-nix-dbus.c.hintoobs-util. The existing libobs C ABI and GIO feature gate remain intact. The C implementation is compiled as a deterministic Tier 3 oracle; the production Rust shim calls GIO directly.RED:
fb3ffbbef— five new Tier 1 cases fail at the safe Rust stubs.GREEN:
598a03b2a— safe state machine, C ABI shim, Tier 3 oracle tests, build group wiring and docs.Verification:
soldr cargo test -p obs-util --lib --features gio platform::dbus_inhibit: five Tier 1 and two Tier 3 cases pass. Reversing service order made Tier 3 fail, then restoring it passed.platform::nix_inhibit_paritytests pass with and without GIO../lint --fix,uv run ci/test_ported_sources.py,uv run ci/test_build_groups.py, anduv run ci/test_registration.pypass.cmake/cross/docker.sh win-x64 mac-arm64passes both full cross builds. The local unchanged C suite passed all 337 OFF cases; the ON focused D-Bus case passed against libobs-with-rust. PR Tier 2 remains the full merge gate.test_inhibit_sleep_dbuspasses against both original and Rust libobs. The two libraries export identical dynamic symbols (1766).Intentional implementation details: the C ABI's opaque inhibitor handle owns a Rust
Boxrather than a C allocation. A null reason pointer becomes an empty string for the GIO call; the deterministic differential oracle covers non-null reasons.CI fix: Fast Gate initially failed because its runner lacked GIO development files. Commit
ded2ee62finstallslibglib2.0-devin the existing package setup step, restoring the explicit GIO dependency check. The local./lintpasses. Remote RED evidence is in the first two CI runs of this PR; the new CI run verifies GREEN.