Skip to content

rust: Port libobs/util/platform-windows.c to obs-util - #707

Merged
zackees merged 5 commits into
obs-rust:masterfrom
nathan-v:port/platform-windows
Oct 14, 2026
Merged

zackees merged 5 commits into
obs-rust:masterfrom
nathan-v:port/platform-windows

Conversation

@nathan-v

Copy link
Copy Markdown
Contributor

Refs #703
Refs #153

What and why

Port libobs/util/platform-windows.c to obs-util::platform::windows::host. ENABLE_RUST_LIBOBS drops that C file on Windows. platform.c stays C (#262). Header-inline win_version_compare stays C.

os_dir, os_cpu_usage_info, and os_inhibit_t are Box values, freed by the close and destroy shims. Returned path strings are bmalloc. A null os_glob out-pointer returns -1 and writes nothing. Null os_dlsym, os_dlclose, os_readdir, and os_closedir do not crash. Version, core-count, and total-memory caches take a mutex; the stored values match the C statics. DllMain sets the timer period only. libobs does not define PTW32_STATIC_LIB, so the pthread static-lib hooks stay out. A short plugin image is caught with MSVC __try in plugin_seh.c; MinGW runs the same checks without that handler. get_win_release_id and DllMain stay hidden.

Please add the claimed label on #703 (and port / enhancement if those are still missing). I cannot add labels.

The #153 checklist item is claimed and is not ticked here.

RED → GREEN

  • RED commit: e73957168. soldr cargo test -p obs-util --test platform_windows — 3 passed (sleepto_ns_past_returns_false, test_mkdir_missing_parent_is_error, test_unlink_missing_fails), 9 failed. test_file_exists failed because host::file_exists stayed false (assertion failed: host::file_exists(&b)). mkdir returned -1 where the test expected 0. abs_path, opendir, and glob returned None. rename, safe_replace, and copy_file returned -1 where the test expected 0. No characterization commit: test/cmocka/test_platform.c already covers these helpers.
  • GREEN commit: 7ce0e5ffb.
    • Tier 1: platform_windows 12 passed.
    • Layout: platform_windows_layout 7 passed.
    • Tier 3: platform_windows_parity 4 passed. export_list 3 passed.
    • soldr cargo test -p obs-util -p obs-graphics -p obs-media-io -p obs-codec --offline exited 0.
    • soldr cargo clippy -p obs-util --all-targets --offline -- -D warnings exited 0.
    • Mutation: file_exists was forced to return false. test_file_exists panicked at rust/obs-util/tests/platform_windows.rs:60 (assertion failed: host::file_exists(&b)). The change was reverted.
  • Tier 2 was not run. Docker is not installed, so ./unittest's cmocka lane and the local-gate stamp were not run. ./lint was not green: ci/test_oracle_standins.py failed because os_breakpoint, os_file_exists, and os_oom were stale DIFFERENT entries; that list is updated in this commit and that test now passes. The other ./lint failures are this machine (missing cmake on PATH for the Python checks, core.autocrlf quoting in the gitignore test, the dirty plugins/obs-websocket submodule, and missing AppImage release assets). CI is not claimed green. This port is done only when Windows Tier 2 passes in CI.

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
  • Characterization test (if the unit had none), then RED, then GREEN commits
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Intentional differences from C listed in the parity test header and rust/README.md (ports)

@nathan-v
nathan-v requested a review from zackees as a code owner October 14, 2026 07:42
@zackees zackees added the ci-full Run every CI job on this PR, including the release-gating OBS app builds and Flatpak label Oct 14, 2026
@zackees

zackees commented Oct 14, 2026

Copy link
Copy Markdown
Member

I rebased this onto master to land it. The local gate's rust-test lane then fails building the C oracle for x86_64-pc-windows-gnu, so I didn't push. The cause is #516: since then, every oracle source is built with the strict flag set (STRICT_FLAGS in rust/obs-c-oracle/build.rs: -Wsign-conversion -Wpedantic -Wmissing-prototypes …) plus -Werror. libobs/util/platform-windows.c had never been built that way under MinGW. Errors:

platform-windows.c:50:26  conversion to uint64_t from LONGLONG may change the sign [-Wsign-conversion]
platform-windows.c:58:26  conversion to uint32_t from int ... [-Wsign-conversion]
platform-windows.c:128:18 ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
platform-windows.c:201:1  no return statement in function returning non-void [-Wreturn-type]
platform-windows.c:138    unused parameters base, nt_headers; :212/213 unused dos_header, nt_headers (the __try block is compiled out under MinGW)
oracle/platform_windows.c:34 no previous prototype for oracle_get_plugin_info, plus the 30 oracle_*_size/align/offset helpers [-Wmissing-prototypes]

Reproduce with uv run ci/local_gate.py --lane rust-test (or soldr cargo build -p obs-c-oracle --target x86_64-pc-windows-gnu).

Two ways out, your call:

  1. Make platform-windows.c clean under the strict set: casts, a return on the MinGW path of the __try function, and UNUSED_PARAMETER. That benefits the C build too.
  2. Compile this one wrapper as its own cc::Build without STRICT_FLAGS, with a comment pointing at build: Maximum C/C++ warning strictness with -Werror on every platform (cross-compiled with soldr) #516, and declare the oracle helpers in the wrapper.

For the missing prototypes and the unused has_obs_export, I have a partial patch: it declares all 30 helpers before the #include and adds a GCC -Wunused-function push/pop around it. I'm happy to push it if you want it; the -Wsign-conversion/-Wpedantic/-Wreturn-type errors still need option 1 or 2. Not merging until this builds.

Safe core in platform::windows::host, C shims for the symbols this
file defines, and Tier 3 parity for the filesystem, path, and version
calls. ENABLE_RUST_LIBOBS drops util/platform-windows.c.
get_win_release_id and DllMain stay hidden.

os_breakpoint, os_oom, and os_file_exists are no longer Windows
oracle stand-ins, so they leave the DIFFERENT list.
@zackees

zackees commented Oct 14, 2026

Copy link
Copy Markdown
Member

An update on the windows-gnu oracle build. I tried option 2: suppress the strict warnings only around the #include "util/platform-windows.c" in the wrapper, and declare the 30 helpers. That doesn't converge. Every pass under MinGW -Wall -Werror surfaces more:

  • implicit declaration of function 'IsWow64Process2' (line 982). It's still undeclared with _WIN32_WINNT=0x0A00 defined in the wrapper, because the forced -include sys/stat.h (build.rs, windows-gnu) pulls in the Windows headers first.
  • missing initializer for MEMORYSTATUSEX / PROCESS_MEMORY_COUNTERS (1284–1340).
  • conversion lacks type at end of format (1366) under MinGW's printf checking.
  • cast between incompatible function types from FARPROC (906–908), set but not used (868), and missing prototypes for oracle_get_plugin_info / oracle_DllMain from the renamed upstream definitions.

So the upstream file has never been a MinGW translation unit, and suppressing warnings would hide real problems such as the implicit IsWow64Process2 declaration. My suggestion: build this oracle wrapper and its platform_windows_parity / _layout comparisons on MSVC only. For example, skip *_windows.c wrappers in build.rs's sources filter when windows_gnu for this file, and #[cfg(target_env = "msvc")] the oracle-backed tests. The Rust port itself still builds and its Tier 1 tests still run on windows-gnu. The MSVC Rust Tests job in CI then covers the comparison against the C. I've reverted my local attempt and pushed nothing. Your call; I'll land it as soon as the local gate passes.

The original file has only been an MSVC translation unit. Under
MinGW -Wall -Werror (obs-rust#516) it fails on headers (IsWow64Process2),
missing initializers and MinGW printf checks. Skip the wrapper on
windows-gnu and gate its parity/layout tests to target_env = msvc; the
Rust port and its Tier 1 tests still build and run on windows-gnu.
Also declare the windows-gnu weak os_gettime_ns stub.

Local-Gate: v1 tree=ee73e6ec57e22fb5855fb6763485d456e12f0b7f secs=510 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791973483,"gate":"rust/all/fmt","host":"linux-x86_64","key":"272151118752dc4daa802d3f6354e8a7f03257924a3e4bb2f3bb478b28c531e0","lane":"lint","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":44,"stamp":"3641ff5ee44fef43fd696e1c5e85c888","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"272151118752dc4daa802d3f6354e8a7f03257924a3e4bb2f3bb478b28c531e0","lane":"lint","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":44,"stamp":"1976ca095ffc1f4319d6892a7f4c09c3","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"7bbd9bc75784491bc714e991ffec753efcd4887bf154c1a865d80121321f4fb5","lane":"rust-test","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":125,"stamp":"a5e8d1b8e33e4c721346d75bc1b7a1ea","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"83e546477feffaee6135aa8fc5ec8fbcd35041e9e7048fa3609e3309639144c2","lane":"cross","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":140,"stamp":"c001d7cabc9c6fea18a2944a07b2812c","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"83e546477feffaee6135aa8fc5ec8fbcd35041e9e7048fa3609e3309639144c2","lane":"cross","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":140,"stamp":"9e6748113af11d97230424a69679dcf0","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"83e546477feffaee6135aa8fc5ec8fbcd35041e9e7048fa3609e3309639144c2","lane":"cross","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":140,"stamp":"54c2eafa610f12e9e73e0602e103e216","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"83e546477feffaee6135aa8fc5ec8fbcd35041e9e7048fa3609e3309639144c2","lane":"cross","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":140,"stamp":"fec42e5c13c14144c35aa518d742bdb0","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"83e546477feffaee6135aa8fc5ec8fbcd35041e9e7048fa3609e3309639144c2","lane":"cross","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":140,"stamp":"61a7b1b3f0a5a4949d3104f57c9d53ee","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"83e546477feffaee6135aa8fc5ec8fbcd35041e9e7048fa3609e3309639144c2","lane":"cross","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":140,"stamp":"2255d823cb397d92ba9c022cc7ffbdfc","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
Ci-Attestation: {"at":1791973483,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"5ec920d4722ba4d74c74669942bb77451476afffecdc3605d3a153fd69d03802","lane":"tier2-linux","parents":["e8e8bcb29ba8c9dd9c26a9268ee3c2fe763434f0"],"secs":200,"stamp":"7aeb608595fdef2d18cdd6ed153da412","tree":"ee73e6ec57e22fb5855fb6763485d456e12f0b7f","v":1,"via":"run"}
@zackees
zackees force-pushed the port/platform-windows branch from 7ce0e5f to 7f5e994 Compare October 14, 2026 10:24
@zackees
zackees enabled auto-merge October 14, 2026 10:24
@zackees

zackees commented Oct 14, 2026

Copy link
Copy Markdown
Member

I pushed a fix so this can land (7f5e994f4). It's queued in the merge queue.

  • Rebased onto master.
  • rust/obs-c-oracle/build.rs skips the platform_windows.c oracle wrapper on windows-gnu. obs_c_oracle::platform_windows and the platform_windows_parity / _layout tests are now #[cfg(all(windows, target_env = "msvc"))]. The original C file has only ever been an MSVC translation unit (see my previous comment for the MinGW errors). The Rust port and its Tier 1 platform_windows tests still build and run on windows-gnu. MSVC's Rust Tests job keeps the C comparison.
  • clang-cl (the cross lint's msvc target) flags two harmless idioms in the unmodified original that cl.exe doesn't (-Wunused-but-set-variable, -Wmissing-field-initializers). Those two are suppressed around the #include, clang only.
  • Declared the windows-gnu weak os_gettime_ns stub in test_stubs.c (-Wmissing-prototypes).

Red: on the rebased branch, the local gate's rust-test lane (MinGW oracle) and then its cross lane (clang-cl) failed. Green: the full local gate passes and is stamped. Your RED/GREEN commits are unchanged. Revert my commit if you'd rather fix the C under MinGW instead.

Local-Gate: v1 tree=772b7dc8fa6aae21fbfdd3046a2c202840b47272 secs=535 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791974977,"gate":"rust/all/fmt","host":"linux-x86_64","key":"2d9ee97ebb74dd8b6308e0aaaeb7e23983709da257712e1c57b62579a3eb15a6","lane":"lint","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":46,"stamp":"bf0d3344b04cc597b513762c28f504cd","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"2d9ee97ebb74dd8b6308e0aaaeb7e23983709da257712e1c57b62579a3eb15a6","lane":"lint","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":46,"stamp":"4844eae9e652a432ead61b5ec20d8a43","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"bdc84ad81e0f4adce3c60d86ed2d6750ea36bdc62011f962de4fd3756856e676","lane":"rust-test","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":159,"stamp":"d07e7b9fb3ec857d7c584f70ec366247","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"e418aa262fa1f1f1c95b28f1ff715681e6a8e75a066d098faca037d99da8d5f5","lane":"cross","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":167,"stamp":"4bb7a18cc59e6ab8fe63bb2702bce5f0","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"e418aa262fa1f1f1c95b28f1ff715681e6a8e75a066d098faca037d99da8d5f5","lane":"cross","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":167,"stamp":"5484576b0bc7c647fadb87927981b9b9","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"e418aa262fa1f1f1c95b28f1ff715681e6a8e75a066d098faca037d99da8d5f5","lane":"cross","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":167,"stamp":"f02eac71a8db0530abfc757182588c57","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"e418aa262fa1f1f1c95b28f1ff715681e6a8e75a066d098faca037d99da8d5f5","lane":"cross","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":167,"stamp":"7baa45b7e1ab8bd2c795873ae46ac353","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"e418aa262fa1f1f1c95b28f1ff715681e6a8e75a066d098faca037d99da8d5f5","lane":"cross","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":167,"stamp":"862fc1d5babad9ae82a9e5b5a19ae033","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"e418aa262fa1f1f1c95b28f1ff715681e6a8e75a066d098faca037d99da8d5f5","lane":"cross","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":167,"stamp":"0fb952330eb77eae6366065f82097b40","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
Ci-Attestation: {"at":1791974977,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"3fc41ac3bae69d2178ab49d68c8a5ed431f2184916519210f6a87c04ec55b23d","lane":"tier2-linux","parents":["7f5e994f4d1516e3c97095cbf018a3f28c2ab1bd"],"secs":163,"stamp":"b4cbafda13593146895aafb2674e8443","tree":"772b7dc8fa6aae21fbfdd3046a2c202840b47272","v":1,"via":"run"}
github-merge-queue Bot pushed a commit that referenced this pull request Oct 14, 2026
* ci: Test that the lint lane clang-formats C under rust/ (RED)

CI's clang-format checks every changed C file; the local gate skipped
rust/, so #707 passed locally and failed CI.

* ci: Clang-format C under rust/ in the lint lane, like CI (GREEN)

Local-Gate: v1 tree=58c73bd5c23cc6b6e027964d86645d83a1bbac50 secs=586 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791975065,"gate":"rust/all/fmt","host":"linux-x86_64","key":"5d08b12b1e0cc00b59f0163f599ed51f9a77054647b4f5a60f0281accc7ceddb","lane":"lint","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":47,"stamp":"472f9e0adf12b3940b9b46fc0d8e0f39","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"5d08b12b1e0cc00b59f0163f599ed51f9a77054647b4f5a60f0281accc7ceddb","lane":"lint","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":47,"stamp":"a49f28f518a53db856237f508b2e47c6","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"0fdce64c304c8be6021a8420c6807cb80e2e4ea4ec263710640f90c16a4287c4","lane":"rust-test","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":156,"stamp":"35627c9d821ebdb447c7d5a4dfdfeab2","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"0f7805217c40a8f2c238c6561d6a29241325e43462ece2b03bcab6826de59a4c","lane":"cross","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":186,"stamp":"ab640773fa17ceb59da983f682d17790","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"0f7805217c40a8f2c238c6561d6a29241325e43462ece2b03bcab6826de59a4c","lane":"cross","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":186,"stamp":"873bda95f91ac927d2239d42e86a200a","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"0f7805217c40a8f2c238c6561d6a29241325e43462ece2b03bcab6826de59a4c","lane":"cross","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":186,"stamp":"ce15b1e367974b0f0d6dd4513cb32e8f","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"0f7805217c40a8f2c238c6561d6a29241325e43462ece2b03bcab6826de59a4c","lane":"cross","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":186,"stamp":"468954e373b8559c4e33647f8ef6155b","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"0f7805217c40a8f2c238c6561d6a29241325e43462ece2b03bcab6826de59a4c","lane":"cross","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":186,"stamp":"dd427bace01695b8efad7d561eaf02ea","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"0f7805217c40a8f2c238c6561d6a29241325e43462ece2b03bcab6826de59a4c","lane":"cross","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":186,"stamp":"32ec0a62dc3a4da8c097c18538d8fc88","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
Ci-Attestation: {"at":1791975065,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"127719da283ebf88005664fd556b009e7cd35adccf62cbf715aed1aca7875c2a","lane":"tier2-linux","parents":["a9ffb4d49686f733c76d9e2d31aa44dd373a97c3"],"secs":197,"stamp":"42c92ea4839ec1688f9a628d13472490","tree":"58c73bd5c23cc6b6e027964d86645d83a1bbac50","v":1,"via":"run"}
obs.dll with ENABLE_RUST_LIBOBS failed to link on Windows:
LNK2019 unresolved external __imp_GetProcessMemoryInfo (Rust Tier 2,
run 38552283210). The C build gets the kernel32 export through
<psapi.h> (PSAPI_VERSION 2) and never links psapi.lib; the staticlib's

Local-Gate: v1 tree=57801363737987ad8cb8d307c685f9205cfc4705 secs=625 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791976882,"gate":"rust/all/fmt","host":"linux-x86_64","key":"958e7641d2a457de3249743520cfb68833e84db5795ca3768df0ae02ac6a7e6b","lane":"lint","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":41,"stamp":"60acaa0a288481d48f97dce377317598","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"958e7641d2a457de3249743520cfb68833e84db5795ca3768df0ae02ac6a7e6b","lane":"lint","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":41,"stamp":"cff73558bc4238eec07181b863d8fcd2","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"217c60e883196050e8f3c62a375f0a10aa8a4b19faeef7d943b9a88a97de8f32","lane":"rust-test","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":172,"stamp":"d5436a0395c4134492914044c884a24a","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"28c9408e95fd21bfaec1a6b5ecf048b2f25f1655e580519d93d2d47a69606e03","lane":"cross","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":215,"stamp":"2280510f827d97a2c5ae13c3d813a99f","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"28c9408e95fd21bfaec1a6b5ecf048b2f25f1655e580519d93d2d47a69606e03","lane":"cross","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":215,"stamp":"c43e6be162baab31e63ed6af69923940","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"28c9408e95fd21bfaec1a6b5ecf048b2f25f1655e580519d93d2d47a69606e03","lane":"cross","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":215,"stamp":"9f5b9bbd56b67dc13c38ecfc27ffa21e","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"28c9408e95fd21bfaec1a6b5ecf048b2f25f1655e580519d93d2d47a69606e03","lane":"cross","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":215,"stamp":"a9ae571fc27289888846eec6dfd0d386","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"28c9408e95fd21bfaec1a6b5ecf048b2f25f1655e580519d93d2d47a69606e03","lane":"cross","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":215,"stamp":"343befce9240d7f2ee9726170d3e2cbb","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"28c9408e95fd21bfaec1a6b5ecf048b2f25f1655e580519d93d2d47a69606e03","lane":"cross","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":215,"stamp":"11f8cff47b852f7265e8697115756c68","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
Ci-Attestation: {"at":1791976882,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"6b6d508566efa5a70fee4d204c20db2b4922ce68ff3c73b7fdd256918b9fadb5","lane":"tier2-linux","parents":["ad2e438f3b97c22fdf4f56c9ea6e5f375dc13717"],"secs":197,"stamp":"bc10b1f5856669c612ed6dd5192635e7","tree":"57801363737987ad8cb8d307c685f9205cfc4705","v":1,"via":"run"}
#[link(name = "psapi")] does not reach CMake's link line.
@zackees

zackees commented Oct 14, 2026

Copy link
Copy Markdown
Member

Rust Tier 2 Windows failed to link obs.dll: LNK2019 unresolved external symbol __imp_GetProcessMemoryInfo (run 38552283210). In C, <psapi.h> maps GetProcessMemoryInfo to kernel32's K32GetProcessMemoryInfo (PSAPI_VERSION 2), so libobs never links psapi.lib. The Rust staticlib's #[link(name = "psapi")] doesn't reach CMake's link line. Pushed a fix: declare it with #[link_name = "K32GetProcessMemoryInfo"] in the kernel32 block and drop the psapi link. Red is that CI link failure; green will be the same check on this push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run every CI job on this PR, including the release-gating OBS app builds and Flatpak

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants