Skip to content

Guides

How to size runners for Rust builds

Cargo builds scale with cores, but it is unclear how far that goes.

4 min read

Cargo builds scale with cores, but it is unclear how far that goes.

Why it happens

rustc parallelises across codegen units nearly linearly, so Rust benefits from larger runners more than most stacks.

How to fix it

  1. 16 vCPU for release builds; the scaling holds further than people expect
  2. Add sccache first — a cold cache wastes whatever size you pick
  3. Link time is single-threaded; consider lld or mold before buying more cores
  4. Debug builds saturate fewer cores than release, so size them separately

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.