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
perf(bench): port_comparison no longer links on master — duplicate obs_hotkey_binding_press/_release after #3075 #3112
cargo bench -p obs-c-oracle --bench port_comparison (the binary behind record.py, and so every number in docs/rust-port/benchmarks/) no longer links on master: the bench's link stand-ins for obs_hotkey_binding_press / obs_hotkey_binding_release (#3025, merged as #3039) now collide with the real shims obs-hotkey exports since #3075 / #1836 (rust/obs-hotkey/src/ffi/binding_press.rs:112,123).
error: linking with `clang-…` failed: exit status: 1
rust-lld: error: duplicate symbol: obs_hotkey_binding_press
>>> defined at port_comparison.2b0aa945e1e760d5-cgu.14 (bench)
>>> defined at obs_hotkey.5ec60e96c386b118-cgu.1 in libobs_hotkey-….rlib
rust-lld: error: duplicate symbol: obs_hotkey_binding_release
Reproduced at 06e8b43e5 (master after #3075) on Linux x86_64, soldr 0.9.46, with a clean target/release link:
soldr cargo bench -p obs-c-oracle --bench port_comparison -- format
Nothing in PR CI builds benches, so this is green in CI and only shows up on the machine of whoever next runs record.py — which right now is the only way to measure the format/audio_mix/volmeter categories (#3009), so it blocks the before/after numbers of #3111, #3004, #3007 and #3029.
Why
#3025's stand-ins exist so the C oracle objects that call libobs functions by their libobs name resolve on lld-link. obs_hotkey_binding_press() and _release() stopped being undefined when #3075 landed the binding press-count port: obs-hotkey now exports both as #[no_mangle] shims. Two definitions of the same name in one binary is an error on rust-lld and lld-link alike; the bench just happened not to be rebuilt since.
Proposed
Delete those two stand-ins from rust/obs-c-oracle/benches/port_comparison.rs; the real exports satisfy the C oracle's references. Guard the class of failure so it cannot come back silently: a ci/ self-test that the bench's stand-in names do not intersect the #[no_mangle] exports of the workspace crates (or simply cargo build --benches, which PR CI does not currently do).
Acceptance criteria
soldr cargo bench -p obs-c-oracle --bench port_comparison -- format links and runs on Linux x86_64 and Windows, with no duplicate-symbol error.
uv run rust/tools/benchmarks/record.py --category format completes and reproduces docs/rust-port/benchmarks/baseline-2026-10-30-linux-x86_64.json within noise.
A check fails if a stand-in name in the bench is also an exported symbol (so a future port that exports one of these names is caught in PR CI, not by hand).
RED: a ci/ self-test that no libobs_stand_ins name in rust/obs-c-oracle/benches/port_comparison.rs is also a #[no_mangle] export of a workspace crate — it fails today on obs_hotkey_binding_press/_release. (The link error itself is the other reproducer; a plain soldr cargo bench --no-run is not something PR CI runs, so the test is what keeps it fixed.)
GREEN: delete those two stand-ins; the real shims in obs-hotkey satisfy the C oracle's references.
Verify the bench links and record.py --category format runs on Linux x86_64, and report the numbers.
I am also carrying #3111 (obs-media-io decompress ratios), which needs this bench to measure; that PR follows this one.
Activity
zackees commentedon Oct 30, 2026
Claiming: bench link stand-in removal (#3112)
Plan: one PR.
ci/self-test that nolibobs_stand_insname inrust/obs-c-oracle/benches/port_comparison.rsis also a#[no_mangle]export of a workspace crate — it fails today onobs_hotkey_binding_press/_release. (The link error itself is the other reproducer; a plainsoldr cargo bench --no-runis not something PR CI runs, so the test is what keeps it fixed.)obs-hotkeysatisfy the C oracle's references.record.py --category formatruns on Linux x86_64, and report the numbers.I am also carrying #3111 (obs-media-io decompress ratios), which needs this bench to measure; that PR follows this one.
perf(bench): drop the port_comparison stand-ins obs-hotkey now exports (