mr-boxington README

The project's README from github.com/jdx/mr-boxington. As one markdown file: README.md.

Mr Boxington, a cache box wearing a monocle and bow tie

mr boxington

A shared cache. A tidier target/.
Reuse Cargo builds across worktrees, keep disk use in check, and run builds together.

Get started · Documentation · Benchmarks · Releases

mbx is a build cache for Rust projects. Cargo still resolves dependencies, plans builds, and runs your tools. mbx restores matching compiler outputs from one shared store and compiles the rest. Each command starts its own cache agent and stops it when the build ends; there is no daemon to manage.

Get started

With mise:

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

Or with Cargo:

cargo install mbx --locked
mbx setup

With mise 2026.9.2 or newer, the Rust option enables wrapping without an mbx setup hook. Open a shell with mise activation or shims on PATH, check Cargo's path, and use Cargo normally:

cargo build
cargo test --workspace --all-features
cargo clippy --workspace --all-targets -- -D warnings

To try mbx without automatic wrapping, install it and run mbx build directly. For coding agents and other non-interactive tools, use mise exec -- cargo build or put mise's shims on their PATH. The setup guide covers desktop applications, older mise versions, and standalone shims.

Verified release archives are available for Linux, macOS, and Windows. All installation options →

What you get

A cold store needs a build to fill it. Unsupported invocations run normally without caching, and restored debug information can retain the original checkout's paths. See how it works and the caching limits.

Use it in GitHub Actions

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: jdx/mr-boxington-action@v1
      - run: mbx test --workspace

Install your chosen Rust toolchain before the cache action. The default backend restores a pruned Cargo target and registry archive; pull requests are restore-only. See the GitHub Action guide for complete workflows, parallel builds, remote servers, and release policy.

Inspect and maintain the cache

mbx doctor          # check tools, setup, and cache access
mbx tui             # watch builds across the machine
mbx stats           # report lifetime savings and workspace sharing
mbx explain --last  # explain the last recorded build
mbx cache stats     # inspect storage
mbx gc --dry-run    # preview collection
mbx clean           # remove this workspace's managed target

On a filesystem that supports reflinks, restored outputs share data blocks with the store until modified. Elsewhere, mbx copies bytes. An existing real target/ is only replaced after you accept a prompt. Understand managed targets →

Find your next step

Task Guide
Set up editors, watchers, and worktrees Local development
Change budgets or build policy Configuration
Choose mold, Wild, or toolchain LLD Managed linkers
Share work across CI runners Remote cache
Cache make or CMake builds Standalone C and C++
Investigate an unexpected result Troubleshooting
Look up a command CLI reference

Contribute

See CONTRIBUTING.md for development setup, documentation checks, tests, and pull request conventions. Ask questions in Discussions; report suspected vulnerabilities through the private process in SECURITY.md.

mbx builds on Cargo and was informed by sccache and kache, which directly inspired its design. Acknowledgements.

License

MIT

mr-boxington (jdx/mr-boxington)

Searching Database…

Что это такое?mbx — это кеш сборки для Rust-проектов. Cargo по-прежнему сам разрешает зависимости, планирует сборку и запускает ваши инструменты, а mbx восстанавливает подходящие результаты компиляции из общего хранилища и компилирует только то, что осталось.
Это замена Cargo или работает вместе с ним?Он работает поверх Cargo, а не вместо него. Каждая команда запускает своего агента кеша и останавливает его по завершении сборки — никакого демона обслуживать не нужно.
Каждая ли сборка попадёт в кеш?Нет. Пустому хранилищу нужна первая сборка, чтобы наполниться; неподдерживаемые варианты запуска просто работают без кеширования, а в восстановленной отладочной информации могут остаться пути из исходного каталога проекта.
Кеширует ли он что-нибудь кроме Rust-проектов?Да, в руководствах есть отдельный режим для сборки на C и C++, включая make и CMake.
Как узнать, почему сборка не попала в кеш?Запустите mbx explain --last: попадания, промахи, недоступные запросы и обходы кеша считаются по отдельности, чтобы было проще разобраться в сборке.
Что вдохновило создателей mbx?Он построен на Cargo, а на его создание повлияли sccache и kache — автор называет их прямым источником вдохновения для его дизайна.
Он не тронет мою существующую папку target/?Существующая настоящая папка target/ заменяется только после того, как вы согласитесь в ответ на запрос. А на файловых системах с reflink восстановленные результаты даже разделяют блоки данных с хранилищем, пока их не изменят.
Creator
jdx
Size
22.2 MB
Stars
517
Age
1mo
Commits · 90 Days