NativeLink

Getting started

The first section of the reading path: a cache running, connected to your build, proven to be hitting.

Who this is for: anyone who has decided to try NativeLink and wants the shortest path to a real result. What you'll have at the end of this section: a cache your build system is talking to, hits you can point at, and, if you want it, the same cache shared with your team. Time: ten minutes for the first win, an afternoon for the shared one.

Before you start

Nothing beyond a build system that speaks the Remote Execution API.

Why caching first

NativeLink does two things: it caches build outputs, and it executes build actions remotely. It is tempting to reach for the second one immediately, because it's the more impressive half. Do the first one first anyway.

Caching is the half with the short feedback loop. You start it, you point your build at it, you build twice, and the second build is faster. The whole loop is minutes and nothing about it can fail mysteriously. Remote execution adds a scheduler, workers, a platform-matching contract, and a toolchain hermeticity requirement, and every one of those is easier to debug when the storage layer underneath is already known-good.

This section is the first of four on the reading path, and each section assumes the one before it is standing:

SectionYou end with
Getting started (you are here)a cache serving hits to your build
Remote executionworkers running the actions that miss the cache
Configurationa config file you wrote and understand
How-to guidesthe backend, transport, and upgrade path you want

Start here, or skip ahead

Start here if NativeLink isn't running yet. Take Quickstart in order; it's a guaranteed happy path and every step tells you what output to expect.

Skip ahead if you already have a cache running and hitting. The next section picks you up at Remote execution and assumes exactly this section's outcome and nothing more.

Skip sideways if your build tool isn't Bazel. The connect your build tool pages cover Buck2, Siso, Pants, BuildStream and CMake via recc: same cache, different flags.

The order to read them in

  1. Quickstart: install NativeLink and get a cache answering on localhost.
  2. Verify your cache: build twice and read the count of remote cache hits.
  3. Connect your build tool: the flags for Buck2, Siso, Pants, BuildStream and recc.
  4. Shared cache: move it off localhost so the rest of the team gets your hits.
NextQuickstart

Install NativeLink and run your first cached build. Ten minutes, one terminal, no cluster required.

On this page