MCPcopy Index your code
hub / github.com/TraceMachina/nativelink

github.com/TraceMachina/nativelink @v1.5.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.5.2 ↗ · + Follow
3,704 symbols 13,503 edges 316 files 361 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

  <img alt="NativeLink" src="https://github.com/TraceMachina/nativelink/raw/v1.5.2/assets/logo-light.svg" width="376" height="100" />

enter the shipstorm

Homepage GitHub stars OpenSSF Scorecard OpenSSF Best Practices Slack License

TraceMachina%2Fnativelink | Trendshift

What's NativeLink?

NativeLink is an efficient, high-performance build cache and remote execution system that accelerates software compilation and testing while reducing infrastructure costs. It optimizes build processes for projects of all sizes by intelligently caching build artifacts and distributing tasks across multiple machines.

NativeLink is trusted in production environments to reduce costs and developer iteration times--handling over billions of requests per month for its customers, including large corporations such as Samsung.

NativeLink Explained in 90 seconds

🔑 Key Features

  1. Advanced Build Cache:
  2. Stores and reuses results of previous build steps for unchanged components
  3. Significantly reduces build times, especially for incremental changes

  4. Efficient Remote Execution:

  5. Distributes build and test tasks across a network of machines
  6. Parallelizes workloads for faster completion
  7. Utilizes remote resources to offload computational burden from local machines
  8. Ensures consistency with a uniform, controlled build environment

NativeLink seamlessly integrates with build tools that use the Remote Execution protocol, such as Bazel, Buck2, Goma, and Reclient. CMake projects work too via recc. See Build CMake projects with NativeLink. It supports Unix-based operating systems and Windows, ensuring broad compatibility across different development environments.

🚀 Quickstart

To start, you can deploy NativeLink as a Docker image (as shown below). The setups below are production-grade installations. See the contribution docs for instructions on how to build from source with Bazel, Cargo, and Nix.

You can find a few example deployments in the Docs.

📦 Prebuilt images

Fast to spin up, but currently limited to x86_64 systems. See the container registry for all image tags and the contribution docs for how to build the images yourself.

Linux x86_64

curl -O \
    https://raw.githubusercontent.com/TraceMachina/nativelink/v1.4.0/nativelink-config/examples/basic_cas.json5

# See https://github.com/TraceMachina/nativelink/pkgs/container/nativelink
# to find the latest tag
docker run \
    -v $(pwd)/basic_cas.json5:/config \
    -p 50051:50051 \
    ghcr.io/tracemachina/nativelink:v1.4.0 \
    config

Windows x86_64

# Download the configuration file
Invoke-WebRequest `
    -Uri "https://raw.githubusercontent.com/TraceMachina/nativelink/v1.4.0/nativelink-config/examples/basic_cas.json5" `
    -OutFile "basic_cas.json5"

# Run the Docker container
# Note: Adjust the path if the script is not run from the directory containing basic_cas.json
docker run `
    -v ${PWD}/basic_cas.json5:/config `
    -p 50051:50051 `
    ghcr.io/tracemachina/nativelink:v1.4.0 `
    config

❄️ Raw executable with Nix

Slower, since it's built from source, but more flexible and supports MacOS. Doesn't support native Windows, but works in WSL2.

Make sure your Nix version is recent and supports flakes. For instance, install it via the next-gen nix installer.

[!CAUTION] Executables built for MacOS are dynamically linked against libraries from Nix and won't work on systems that don't have these libraries present.

Linux, MacOS, WSL2

curl -O \
    https://raw.githubusercontent.com/TraceMachina/nativelink/main/nativelink-config/examples/basic_cas.json5

nix run github:TraceMachina/nativelink ./basic_cas.json5

See the contribution docs for further information.

🤝 Contributing

Visit our Contributing guide to learn how to contribute to NativeLink. We welcome contributions from developers of all skill levels and backgrounds!

📊 Stats

Alt

📜 License

Copyright 2020–2025 Trace Machina, Inc.

Licensed under the Functional Source License, Version 1.1, Apache 2.0 Future License. SPDX identifier: FSL-1.1-Apache-2.0.

After the second anniversary of the date this version was made available, you may use this software under the Apache License, Version 2.0.

Extension points exported contracts — how you extend this code

SchedulerStoreDecodeTo (Interface)
The instructions on how to decode a value from a Bytes & version into the underlying type. [14 implementers]
nativelink-util/src/store_trait.rs
MetricsComponent (Interface)
The trait that all components that can be published must implement. [45 implementers]
nativelink-metric/src/lib.rs
KnownPlatformPropertyProvider (Interface)
(no doc) [6 implementers]
nativelink-scheduler/src/known_platform_property_provider.rs
FileEntryHooks (Interface)
(no doc) [6 implementers]
nativelink-store/tests/filesystem_store_test.rs
WorkerApiClientTrait (Interface)
This is used in order to allow unit tests to intercept these calls. This should always match the API of `WorkerApiClient [2 …
nativelink-worker/src/worker_api_client_wrapper.rs
RedisManager (Interface)
A wrapper around Redis to allow it to be reconnected. [2 implementers]
nativelink-store/src/redis_store.rs
ByteStream (Interface)
(no doc) [3 implementers]
nativelink-proto/genproto/google.bytestream.pb.rs
ResultExt (Interface)
(no doc) [2 implementers]
nativelink-error/src/lib.rs

Core symbols most depended-on inside this repo

clone
called by 976
nativelink-store/src/gcs_client/mocks.rs
err_tip
called by 835
nativelink-error/src/lib.rs
to_string
called by 732
nativelink-util/src/resource_info.rs
clone
called by 401
nativelink-util/src/fastcdc.rs
insert
called by 266
nativelink-util/src/evicting_map.rs
as_ref
called by 262
nativelink-util/src/fs.rs
send
called by 215
nativelink-util/src/buf_channel.rs
update_oneshot
called by 171
nativelink-store/src/memory_store.rs

Shape

Method 1,452
Function 1,267
Class 774
Enum 116
Interface 95

Languages

Rust95%
TypeScript4%
Python1%
C++1%
Java1%
Go1%

Modules by API surface

nativelink-proto/genproto/build_event_stream.pb.rs97 symbols
nativelink-proto/genproto/build.bazel.remote.execution.v2.pb.rs94 symbols
nativelink-proto/genproto/failure_details.pb.rs71 symbols
nativelink-util/src/store_trait.rs70 symbols
nativelink-store/tests/redis_store_test.rs70 symbols
nativelink-worker/src/running_actions_manager.rs66 symbols
nativelink-store/tests/filesystem_store_test.rs63 symbols
nativelink-store/src/filesystem_store.rs62 symbols
nativelink-store/tests/fast_slow_store_test.rs52 symbols
nativelink-store/src/redis_store.rs49 symbols
nativelink-worker/tests/running_actions_manager_test.rs47 symbols
nativelink-util/tests/resource_info_test.rs45 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add nativelink \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact