Skip to content

mr boxingtonA shared cache for Cargo builds

Reuse matching compilation work across projects, worktrees, and CI. Mr Boxington manages the cache and prunes old entries while you keep using Cargo.

mise use --global --tool-option mr_boxington=true rust mr-boxington

Linux · macOS · WindowsMore install options

Mr Boxington, a cardboard cache box with a monocle and a handlebar mustache
  1. Fold: Two pens draw a flat cardboard net. It folds up into a box, the lid slams shut, and a strip of tape runs down the front.
  2. Mr Boxington: The box leaps, lands, and comes to life as Mr Boxington: a skeptical eye, a monocle on a brass chain, a handlebar mustache, and rosy cheeks. His name card reads mr boxington, a shared cache for Cargo builds.
  3. What mbx does: The camera dives into his monocle, and the line mbx reuses Cargo compiler work across projects, worktrees, and CI slams into place.
  4. Every checkout compiles again: Without a shared cache, a project, a worktree, and a CI runner each run cargo build and compile the same crates again, and old target/ directories pile up.
  5. Under cargo build: You keep typing cargo build. Cargo plans the build, and mbx wraps each rustc call it makes, with no daemon to manage.
  6. First build fills the store: The first build compiles as usual, and mbx stores each output under a key of its inputs, with the checkout's paths replaced by placeholders. Nothing was cached yet, so Mr Boxington finishes taped, without a strawberry.
  7. Same checkout, empty target/: Measured in the aube benchmark: the same checkout with an empty target/ restores 577 of 577 compilations from the store in 3.3 seconds. Mr Boxington blushes, is taped, and gets a strawberry.
  8. Another worktree: A new worktree at another path computes the same keys, so its matching crates are restored and only the edited crate compiles.
  9. Six builds at once: Six builds running at once share one pool of compiler permits. Cache hits never wait, and a compilation two of the builds need runs once. In the aube benchmark, six CI jobs on one runner peaked at 31 compilers running at once with the scheduler on, against 172 with it off.
  10. CI: In CI, pushes to main publish compiled outputs to a remote cache, such as the GitHub Actions cache, a cache server, or an S3 bucket, and pull requests only restore from it.
  11. Next push, measured: A bar chart of the aube benchmark's next push in CI, with the cache holding the previous commit: Cargo alone takes 33.2 seconds and Cargo with mbx takes 23.2 seconds, 10.1 seconds less, with 568 of 577 compilations restored and 9 compiled.
  12. target/ pruned: target/ lives in the cache. Cartons of old target directories pile up, and after a build mbx removes those whose checkout is gone or that went unused for 30 days, then the least recently used while the pile is over its disk budget.
  13. Morph: The cartons that were kept melt together into one liquid shape, which sets into Mr Boxington's outline.
  14. End card: Mr Boxington returns in full with a strawberry beside his tape, above the name mr boxington, the line A shared cache for Cargo builds, the command cargo install mbx --locked && mbx setup, and the address mr-boxington.jdx.dev.
Build times come from the benchmarks.

Reuse builds across worktrees

When you build in a new worktree, Mr Boxington checks the shared cache for matching compiler outputs before compiling. Configure a remote store to share cached work with CI.

How cache matching works
two worktrees / one storeillustration

~/project$ mbx build

Compilinglibcstored for later
Compilingserdestored for later
Compilingyour-appstored for later

Compiler outputs stored for reuse.

Follow build progress

Animated Boxington mascot beside mbx build output showing live and completed crates
Build output during a rebuild.

Inspect builds and cache usage

Example build data
mbx Live dashboard with build activity, hit and miss graphs, store capacity, and compilation savings
View active builds, cache transfers, and storage usage in the dashboard. View full size
MIT LicenseCopyright © 2026jdx.dev