Trucker – Rust worktree build cache that just works

(github.com)

1 points | by kevsten 4 hours ago ago

1 comments

  • kevsten 4 hours ago ago

    Howdy y'all.

    I build most of my side projects on either my MacBook Pro or a single linux server I run.

    These days, that looks like 20-40 concurrent worktrees building on a machine, and the biggest bottleneck is build times (and other CI/check) work.

    While I excitedly wait for the great work that is being done on Rust itself ([1], [2]), I wanted faster builds that worked well today, and didn't have tons of rough edges.

    I've tried sccache, kache, and other tools but they failed to increase _throughput_:

    - `sccache` quickly fill up even my 2TB disk with build artifacts.

    - `kache` is fast for the first build, but made the first worktree edit slow

    - `mr-boxington` made incremental builds faster, but wasn't mature enough for complex projects

    Trucker handles all of that, and just works (TM).

    - It makes your first build in a worktree 10x faster.

    - It keeps your first edits in a worktree as fast as if they had been built fresh by Cargo.

    - It uses a sane amount of disk (a lot less than cargo alone) and garbage collects.

    - It has been tested and benchmarked on many large complex crates, with complex builds like Zed, Bevy, sqlx, wasmgen, pyo3, and a lot more

    I hope it helps y'all too.

    ---

    P.S. Check out the Rust Project's Goals and consider funding them!

    1. Rust Sullivan's work on [Rust workspace caching](https://goals.rust-lang.org/2026/cargo-cross-workspace-cache...)

    2. Matyas Susits work on [Relink don't rebuild](https://goals.rust-lang.org/2026/relink-dont-rebuild.html)