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(libobs): cache the Rust staticlib as a module and drop needless Corrosion serialisation #3265
Treat libobs_rust-static as one more cached module, keyed on Cargo.lock, the rustc version and the sources of the linked crates (the linked_crates set in ci_scope.py). Remove obs_serialize_cargo_build stalls where they are not needed.
Acceptance criteria
The hybrid warm-rebuild wall time drops from 6.0 s to under 2 s.
RED then GREEN where a check applies; record before and after build times. Parent: #3256.
/investigate
Blocked by #3262 (it reuses the module key and cache to store the Rust staticlib) and #3257 (the 6.0 s to under 2 s criterion needs the baseline). The Corrosion-serialisation half could be split out and started now if someone wants it early.
Claiming: #3265, stacked on #3321 (the module cache).
Plan, one PR:
RED: tests that the Rust staticlib's key changes with a linked crate's source, Cargo.lock, the features and the toolchain, and does not change for a crate libobs-rust does not link.
GREEN:
rust.cmake writes libobs-modcache-rust.json: the archive path, Corrosion's features, the triple, the profile and the C compiler.
ci/libobs_modules.py keys the staticlib on that json, Cargo.lock, rust-toolchain.toml, rustc -vV, RUSTFLAGS, gio's pkg-config version, and every file of the path crates libobs-rust depends on (from cargo metadata), plus the two files outside those crates that their build scripts read (libobs/obs-hotkeys.h, the vendored jansson headers).
On a hit, libobs links a cached IMPORTED archive with Corrosion's link libraries and options, and the cargo build target leaves the build.
Before and after times: a fresh build dir with a warm cache, and a C-only edit.
Claim bot:@zackees, this can't be claimed yet: it needs investigation before anyone can implement it. Comment Claiming: investigation to take the research.
Done in #3324: the Rust staticlib is cached as a lib-module. A warm cache in a fresh build dir runs 0 compiles and skips cargo (cold 28 s, warm 15 s on Linux); exports are identical. The 6.0 s → <2 s no-op target could not be shown: a no-op rebuild is ~17 ms with or without the cache.
Activity
zackees commentedon Oct 31, 2026
/investigate
Blocked by #3262 (it reuses the module key and cache to store the Rust staticlib) and #3257 (the 6.0 s to under 2 s criterion needs the baseline). The Corrosion-serialisation half could be split out and started now if someone wants it early.
zackees commentedon Nov 1, 2026
Claiming: #3265, stacked on #3321 (the module cache).
Plan, one PR:
Cargo.lock, the features and the toolchain, and does not change for a crate libobs-rust does not link.rust.cmakewriteslibobs-modcache-rust.json: the archive path, Corrosion's features, the triple, the profile and the C compiler.ci/libobs_modules.pykeys the staticlib on that json,Cargo.lock,rust-toolchain.toml,rustc -vV, RUSTFLAGS, gio's pkg-config version, and every file of the path crates libobs-rust depends on (fromcargo metadata), plus the two files outside those crates that their build scripts read (libobs/obs-hotkeys.h, the vendored jansson headers).github-actions commentedon Nov 1, 2026
Claim bot: @zackees, this can't be claimed yet: it needs investigation before anyone can implement it. Comment
Claiming: investigationto take the research.test(libobs): the Rust staticlib is a cached lib-module (#3265)
build(libobs): the Rust staticlib is a cached lib-module (#3265)
zackees commentedon Nov 1, 2026
Done in #3324: the Rust staticlib is cached as a lib-module. A warm cache in a fresh build dir runs 0 compiles and skips cargo (cold 28 s, warm 15 s on Linux); exports are identical. The 6.0 s → <2 s no-op target could not be shown: a no-op rebuild is ~17 ms with or without the cache.
build(libobs): the Rust staticlib is a cached lib-module (obs-rust#3265…