build: speedup compile times via dev-profile debuginfo, git2 0.20, rustls - #4
Open
jakob1379 wants to merge 1 commit into
Open
build: speedup compile times via dev-profile debuginfo, git2 0.20, rustls#4jakob1379 wants to merge 1 commit into
jakob1379 wants to merge 1 commit into
Conversation
- dev profile: line-tables-only for workspace code, no debuginfo for dependencies and build scripts - git2 0.19 -> 0.20 as a workspace dependency with default-features off: only local git operations are used, so the ssh/https transports, libssh2-sys, and vendored openssl leave the build graph - diffcore-core reqwest: rustls-tls-native-roots (system trust store kept) instead of native-tls; tauri dev-dep reqwest likewise, so cargo test no longer needs system OpenSSL headers Full clean dev build 177.6s -> ~125-135s with plain cargo; 61.1s +/- 0.7s (hyperfine, n=3) with the mold+sccache devShell. 2191 tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three independent, behavior-preserving changes to the dependency graph and dev profile:
Dev-profile debuginfo cuts (workspace
Cargo.toml): workspace crates emitline-tables-only(backtraces keep file:line), dependencies and build scripts emitnone. Nobody steps through tokio/tauri internals in a debugger; full
debug = 2for750 dep crates was pure cost.
target/shrinks 3.5G → 2.2G.git2 0.19 → 0.20,
default-features = false, moved to[workspace.dependencies]:diffcore only performs local git operations (
Repository::open/discover/init, diffs,statuses, branches — verified by grep, no clone/fetch/push/remote/credential usage
anywhere). Dropping the default
ssh/httpstransport features removeslibssh2-sys,openssl-sys, and the vendored-OpenSSL C build from the graph entirely, and shrinksthe bundled libgit2 build.
reqwest: native-tls →
rustls-tls-native-roots(diffcore-core, and thediffcore-tauri dev-dependency): unifies on the rustls stack tauri-plugin-updater
already compiles, instead of building two TLS stacks.
native-roots(not plainrustls-tls) keeps the **syate proxies / private CAskeep working;
macos-system-configurationkeeps macOS proxy detection. Side benefit:cargo testno longer needsNumbers
Measured with hyperfine on a 16` between runs):
cargo clean -p× 3 crates)Single-shot timings on this workload swing ±25% with thermal state — the hyperfine
numbers are the trustworthy one
Verification
cargo tree -i native-tls/ build graph, dev-depsincluded (native-tls only appears under the optional
embeddingsfeature via hf-hub)requirements); all findings resolved or refuted with measurements
Notes
explicitly preserved via `nat
machines without it); a nix d as a follow-up.