You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: Port util/platform-nix-inhibit.c to obs-util #1500
Port libobs/util/platform-nix-inhibit.c.h to obs-util: the Linux and FreeBSD os_inhibit_sleep_create, os_inhibit_sleep_set_active and os_inhibit_sleep_destroy.
Phase and position
Phase 4 (platform utilities). The file was split out of platform-nix.c in #454, so the portal and D-Bus sleep inhibitors stay when the rest of platform-nix is ported (#403 had dropped them, #453).
Dependencies and existing tests
Calls the D-Bus (platform-nix-dbus.c.h) and portal (platform-nix-portal.c.h) inhibitors, which stay C for now (GDBus). The Rust port keeps calling them through their C functions. The GIO-gated paths depend on GIO_FOUND from CMake, which has to reach the Rust build.
test_inhibit_sleep_dbus exists. First audit what it covers (it must run, not skip, against libobs-with-rust), and add a C-only characterization test for the other paths (no session bus, no portal, repeated activate/deactivate, destroy while active) before the port.
Notes
Preserve public headers, exported signatures and existing C tests. The port follows RED then GREEN with Tier 1 tests, the symbol and layout checks, differential parity against the C oracle where the behaviour is observable, and unchanged Tier 2 OFF/ON. No intended behaviour changes.
Current authorized work is the claim and characterization; the Rust implementation follows in its own PR.
Characterization PR (C only): audit test_inhibit_sleep_dbus against both lanes, then pin the other paths (no session bus, no portal, repeated activate/deactivate, destroy while active). The port won't edit it.
Port PR: obs-util under src/platform/unix, shim swap, Tier 1, symbol and layout checks, parity against the C oracle, Tier 2 OFF/ON unchanged. Keeps calling the C D-Bus and portal inhibitors.
Activity
rdoupe commentedon Oct 20, 2026
Claiming: #1500
Plan:
test_inhibit_sleep_dbusagainst both lanes, then pin the other paths (no session bus, no portal, repeated activate/deactivate, destroy while active). The port won't edit it.obs-utilundersrc/platform/unix, shim swap, Tier 1, symbol and layout checks, parity against the C oracle, Tier 2 OFF/ON unchanged. Keeps calling the C D-Bus and portal inhibitors.First PR expected within a day.
obs-util: Port Linux sleep inhibition to Rust (obs-rust#1504)