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
build(obs-c-oracle): link the cached libobs modules instead of recompiling libobs C #3263
When OBS_LIBOBS_MODULE_DIR is set, rust/obs-c-oracle/build.rs links libobs-mod-ported and libobs-mod-util and hashes the module-key manifest, replacing the FNV walk over all of libobs/ (build.rs:3-12). A plain cargo test keeps the cc fallback. Assert that the oracle-only flags match the module flags.
Acceptance criteria
A Rust-only port edit runs no oracle cc compiles, Tier 3 results are unchanged, and a plain cargo test still works.
RED then GREEN where a check applies; record before and after build times. Parent: #3256.
Investigated before claiming. The proposed mechanism can't work, and the acceptance criterion already holds.
Why the oracle can't link CMake's module archives: each of the 227 wrappers in rust/obs-c-oracle/oracle/ renames every global symbol with #define foo oracle_foo before it includes the original C (for example array_serializer.c → util/array-serializer.c.h), so the C links next to the Rust implementation of the same functions. libobs-mod-ported compiles those sources unrenamed. Linking it into the test binaries would collide with the Rust exports, and it would have none of the oracle_* entry points the Tier 3 tests call. Matching the rename set in CMake would mean a second, CMake-side copy of all 227 rename lists.
Acceptance criterion "a Rust-only port edit runs no oracle cc compiles" already holds. I appended a line to rust/obs-output/src/interleave.rs and rebuilt obs-tests-core (soldr cargo test -p obs-data --test obs-tests-core --no-run -v). Cargo reports Fresh obs-c-oracle: no build-script rerun and no cc compile. The build script only reruns on oracle/, vendor/, libobs/ and two nvenc files (rerun-if-changed, build.rs:783-789).
What's left is the cost the #3257 baseline measured: any libobs C edit reruns the script and recompiles the oracle (about 3.5 s, with cc's parallel feature on since #3255). Narrowing that would mean rerunning only for the wrappers whose include closure changed, which is a different change from this issue's.
Proposal: close #3263 as not planned (the scope is infeasible, and the stated goal is met). If the 3.5 s per libobs edit matters, file a new sub-issue under #3256 for per-wrapper invalidation. I'll close it on the next tick unless someone objects.
Closing as not planned, per the investigation above. The oracle's wrappers rename every symbol to oracle_*, so CMake's module archives can't stand in for them. The stated goal already holds: a Rust-only port edit leaves obs-c-oracle Fresh, with no cc compiles. Per-wrapper invalidation for libobs C edits (about 3.5 s) can be filed separately under #3256 if it's worth doing.
Activity
zackees commentedon Oct 31, 2026
/investigate
Blocked by #3262 (it links the cached modules and hashes the module-key manifest that #3262 introduces).
zackees commentedon Nov 1, 2026
Investigated before claiming. The proposed mechanism can't work, and the acceptance criterion already holds.
Why the oracle can't link CMake's module archives: each of the 227 wrappers in
rust/obs-c-oracle/oracle/renames every global symbol with#define foo oracle_foobefore it includes the original C (for examplearray_serializer.c→util/array-serializer.c.h), so the C links next to the Rust implementation of the same functions.libobs-mod-portedcompiles those sources unrenamed. Linking it into the test binaries would collide with the Rust exports, and it would have none of theoracle_*entry points the Tier 3 tests call. Matching the rename set in CMake would mean a second, CMake-side copy of all 227 rename lists.Acceptance criterion "a Rust-only port edit runs no oracle
cccompiles" already holds. I appended a line torust/obs-output/src/interleave.rsand rebuiltobs-tests-core(soldr cargo test -p obs-data --test obs-tests-core --no-run -v). Cargo reportsFresh obs-c-oracle: no build-script rerun and nocccompile. The build script only reruns onoracle/,vendor/,libobs/and two nvenc files (rerun-if-changed, build.rs:783-789).What's left is the cost the #3257 baseline measured: any libobs C edit reruns the script and recompiles the oracle (about 3.5 s, with cc's
parallelfeature on since #3255). Narrowing that would mean rerunning only for the wrappers whose include closure changed, which is a different change from this issue's.Proposal: close #3263 as not planned (the scope is infeasible, and the stated goal is met). If the 3.5 s per libobs edit matters, file a new sub-issue under #3256 for per-wrapper invalidation. I'll close it on the next tick unless someone objects.
zackees commentedon Nov 1, 2026
Closing as not planned, per the investigation above. The oracle's wrappers rename every symbol to
oracle_*, so CMake's module archives can't stand in for them. The stated goal already holds: a Rust-only port edit leavesobs-c-oracleFresh, with nocccompiles. Per-wrapper invalidation for libobs C edits (about 3.5 s) can be filed separately under #3256 if it's worth doing.