Skip to content

Accelerate Rust compilation time with workspace dependencies #2430

Closed
@jpraynaud

Description

@jpraynaud

Why

We want to reduce the compilation times in the repository and we have noticed that some common dependencies to our crates are rebuilt too frequently: small modifications in the code can lead to high compilation time.

What

Declare common dependencies in the workspace to avoid recompiling them too frequently.

How

  • Identify the common dependencies (e.g. serde, clap, tokio, ...)
  • In the Cargo.toml file of the workspace, add the common dependencies and their common features (use the intersection)
  • Assess that compile times are lower
  • Adapt the dependency upgrade:
    • script
    • runbook?

Metadata

Metadata

Assignees

Labels

devX 🌞Developer experience

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions