Skip to content

Remove some dev-dependecies cargo features to speed up compilation #535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ludfjig
Copy link
Contributor

@ludfjig ludfjig commented May 28, 2025

Decrease the amount of crates we have to compile.
cargo test goes from compiling 382 crates to 358.
cargo build goes from 164 to 160.

On my machine:

  • compilation times of cargo build goes from 28.1s to 26.8s
  • compilation times of cargo test goes from 84.4s to 65.5s

Note that the built crate (behind default feature build-metadata) brings in roughly 60 crates and the build script takes roughly 20s on my machine due to bringing in libgit2-sys. Disabling this feature brings cargo build down to only 98 crates, and cuts complication time by 60%. Should we make build-metadata feature off-by-default?

@ludfjig ludfjig force-pushed the minimize_dev_deps branch from ac4c80c to 2929107 Compare May 28, 2025 19:55
@ludfjig ludfjig added kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. area/infrastructure Concerns infrastructure rather than core functionality area/dependencies Concerns dependencies or related components and removed area/infrastructure Concerns infrastructure rather than core functionality labels May 28, 2025
simongdavies
simongdavies previously approved these changes May 29, 2025
Copy link
Contributor

@simongdavies simongdavies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simongdavies simongdavies dismissed their stale review May 29, 2025 10:44

meant to comment

Copy link
Contributor

@dblnz dblnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to solve conflict

@ludfjig ludfjig force-pushed the minimize_dev_deps branch 2 times, most recently from dcf6f4f to e30d48e Compare June 30, 2025 22:54
@ludfjig ludfjig requested review from simongdavies and dblnz July 1, 2025 00:15
@ludfjig
Copy link
Contributor Author

ludfjig commented Jul 1, 2025

need to solve conflict

fixed

@ludfjig ludfjig force-pushed the minimize_dev_deps branch from e30d48e to ff471dc Compare July 1, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies Concerns dependencies or related components kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants