# Churro: Rust dependencies, compiled by us, ready for everyone

> Churro compiles popular Rust crates once and serves them from a global, verified cache. Cargo downloads your dependencies instead of building them, so you only compile your own code. Free and open source, MIT or Apache-2.0.

**Setting this up for someone?** Follow [setup.md](https://churro.sh/setup.md). To have a coding agent do it, paste this into the agent:

```text
Set up Churro using https://churro.sh/setup.md
```

## At a glance

- **1 line** to switch it on. No config files, no code changes.
- **2 builders** must agree byte for byte before we publish anything.
- **0 uploads** from your machine. Your own code never leaves it.
- **Free** for every Rust project. Open source, MIT or Apache-2.0.

## Warm before you get there

Most build caches start empty and only fill from your own builds. We fill this one ahead of time, so every Rust project, even a brand-new one, starts warm.

- **We compile.** Our builders compile the dependencies of popular open-source projects, in sandboxes with no network, before anyone asks.
- **One cache.** A crate only goes in when two independent builders produce exactly the same bytes. Then it's signed.
- **You download.** Nothing to fill, no runner to warm up. A brand-new CI job gets hits on its very first run.

It helps most where builds start from scratch: CI runners, fresh clones, git worktrees and Docker builds.

## Only your code compiles

Churro sits between Cargo and `rustc` as a `RUSTC_WRAPPER`. When a dependency is in the cache with exactly your inputs, you download it instead of compiling it. Anything that isn't in the cache compiles as usual, so the worst case is a normal build.

A clean build of a real Tauri app got all 367 of its dependency builds from the cache.

## Two builders have to agree

We compile every crate on independent builders. If their results differ by a single byte, nothing is published. Whatever you download, Churro checks its signature and hash before using it.

- **Built in sealed sandboxes.** Only our builders write to the cache. They compile with no network and a read-only system, never on someone's laptop.
- **Published when builders agree.** Independent builders must produce byte-identical output. If two results ever differ, that crate is pulled until a human looks.
- **Checked on your machine.** Every result is signed. Churro checks the signatures against keys you trust and every file against its hash. The server is just storage.
- **Your code stays yours.** Only crates.io dependencies come from the cache. Your own crates always compile locally, and nothing you build is uploaded.

A cached result is only used when everything that affects the output matches your build: the crate's source (checked against your `Cargo.lock`), the compiler, target, flags, features, environment, and the compiled dependencies it links against.

## Run your own

For a company, a team or just your own machines. The same client and the same checks, with your builders and your keys. Deploy to Cloudflare, or run a single Docker server on any S3-compatible storage. From a clone of the repository:

| command | what it does |
|---|---|
| `cargo ops init` | Where it runs, who builds, your root key. |
| `cargo ops deploy` | Cloudflare Worker and R2, or Docker. |
| `cargo ops nodes setup` | Add a Linux builder. |
| `cargo ops session` | Build, sign and publish. |
| `cargo ops client-config` | Settings for your team and CI. |

## Get started

```sh
cargo install --locked --git https://github.com/usechurro/churro churro-client
export RUSTC_WRAPPER=churro CHURRO_HOST_ARTIFACTS=1
cargo build
churro stats   # what came from the cache
```

[setup.md](https://churro.sh/setup.md) has the full steps, CI setup and troubleshooting.

## Links

- [Setup instructions](https://churro.sh/setup.md)
- [Catalog of cached crates, and the public API](https://churro.sh/catalog.md)
- [Agent Skill](https://churro.sh/.well-known/agent-skills/churro/SKILL.md)
- [Source on GitHub](https://github.com/usechurro/churro)
- [llms.txt](https://churro.sh/llms.txt)
