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): compile the oracle's C in parallel (cc 'parallel' feature is off) #3253
rust/obs-c-oracle/build.rs compiles more than 225 C translation units: 217 files under oracle/, plus jansson and libobs sources pulled in by the wrappers. It does this through cc::Build::compile()without the cc crate's parallel feature. rust/obs-c-oracle/Cargo.toml:15 declares cc = { workspace = true, default-features = true }, and cc's defaults are empty. Only rust/obs-build/Cargo.toml:19 enables parallel.
Feature unification doesn't save it either. In soldr cargo tree -p obs-c-oracle -e features,build -i cc, and the same for -p obs-data, cc has only feature "default". So whenever the oracle archive misses the cache, every C file compiles in series.
The build script reruns on any change under libobs/ (build.rs:783-789 watches it recursively), which includes switching branches. A warm rebuild with zccache hits takes about 21 s for 225 objects. A cold one runs file after file, and on a loaded box it ran for tens of minutes (a 2026-10-31 local soldr cargo test -p obs-data --test obs-tests-core run spent more than 37 minutes inside this build script).
Proposed change
Enable features = ["parallel"] for the cc build-dependency of obs-c-oracle, and of every other crate whose build script compiles C (obs-data has a cc build-dependency too). Or enable it once in [workspace.dependencies]. cc then respects the cargo jobserver, so it doesn't oversubscribe.
Acceptance criteria
cargo tree -e features -i cc shows parallel for the oracle.
On a forced cold rebuild of the oracle (touch a libobs header and clear target/*/build/obs-c-oracle-*), the wall time drops roughly by the core count. Record the before and after.
Activity
zackees commentedon Oct 31, 2026
Claiming: enable cc's
parallelfeature for every build script that compiles C, with before/after numbers for a cold oracle rebuild. PR today.test(ci): require cc's parallel feature for build-script C (#3253) [RED]
build: compile build-script C in parallel via cc's parallel feature (#…
test(ci): no profile may pin codegen-units = 1 (#3253)
build: compile build-script C in parallel; forbid pinned codegen-unit…