NativeLink

Introduction

NativeLink is a remote build cache and execution service in one Rust binary. This is the documentation for running it yourself.

NativeLink is a remote build cache and a remote execution service in one program. Your build tool asks it "have you already built this?" and, when the answer is no, "can you build it for me over there?" Your source code doesn't change and your build files don't change: you point your build tool at a URL, and work that used to happen on your machine stops happening on your machine.

It's written in Rust and ships as a single binary that plays every role in the system: cache, scheduler, and worker are the same executable started with different configuration. It speaks the Remote Execution API, an open protocol rather than a NativeLink invention, which is why Bazel, Buck2, Siso, Pants and BuildStream connect to it without a plugin, and why plain CMake projects can via recc.

This site documents the open-source distribution: setting it up, configuring it, deploying it, operating it when other people depend on it, and contributing to it.

Working with agents

If you're pointing a coding agent at NativeLink, at these docs or at the codebase, For agents has the three entry points and what each guarantees. If you're here because your agents are the ones waiting on builds, start with AI coding agents.

The reading path

The first four sections are ordered, and each one assumes the last. You can skip ahead, but the pages will tell you what they expected you to have.

SectionWhat you have at the end
Getting startedA cache your build is talking to, and hits you can point at
Remote executionCache misses executing on the farm instead of on your laptop
ConfigurationThe ability to write a config from an empty file instead of copying one
How-to guidesThe storage backend, transport and upgrade path you actually want, instead of the ones an example gave you

Two sections are ordered against the reading path without being part of it. Why NativeLink comes before Getting started: what a remote cache and remote execution actually do, and a short check for whether your build is one that benefits. It's worth ten minutes if you haven't decided yet. Operate comes after How-to guides, for when other people depend on your cluster and "it works on my machine" stops being the bar.

Everything else sits outside the ordering: reference material you look things up in, explanations you read when you want to know why, and the contribution guides. Those are entered from a search or a link, at any point.

Start where you are

I'm deciding whether this is for us

I want to get something running

I want to configure it

  • The config model: how a NativeLink config is put together, in one page.
  • Stores: declaring, naming and composing the storage a cache is built from.
  • Scheduler and workers: how work gets matched to machines.
  • Your first full config: the capstone: a complete cluster written from an empty file.
  • How-to guides: TLS and auth, multiple workers, cloud object stores, upgrades, migrating an existing cache.

I want to run it in production

I want to understand how it works

I need to look something up

I want to contribute

FAQ

Every page here ends with an FAQ for its own topic. These are the questions we get most overall.

On this page