1
1
Fork
You've already forked objfs
0
Distributed build cache for Rust using NativeLink's Remote Execution API
  • Rust 100%
Norman Nunley, Jr 04958fc74b docs: Use generic RE API v2 language and cargo install instructions
docs: Use generic RE API v2 language and cargo install instructions
2026年03月01日 17:01:45 -05:00
.git-issue track: Add issues for ccache-level C/C++ support 2026年02月28日 23:01:20 -05:00
docs docs: Use generic RE API v2 language and cargo install instructions 2026年03月01日 17:01:45 -05:00
examples fix: Scrub personal references from source code and scripts 2026年03月01日 15:29:00 -05:00
proto refactor: replace nativelink-proto with self-generated protos 2026年03月01日 16:40:30 -05:00
src docs: Use generic RE API v2 language and cargo install instructions 2026年03月01日 17:01:45 -05:00
tests test: Add integration tests for objfs init subcommand 2026年03月01日 16:10:38 -05:00
.gitignore track: Add issues for ccache-level C/C++ support 2026年02月28日 23:01:20 -05:00
build.rs refactor: replace nativelink-proto with self-generated protos 2026年03月01日 16:40:30 -05:00
Cargo.lock refactor: replace nativelink-proto with self-generated protos 2026年03月01日 16:40:30 -05:00
Cargo.toml refactor: replace nativelink-proto with self-generated protos 2026年03月01日 16:40:30 -05:00
README.md docs: Use generic RE API v2 language and cargo install instructions 2026年03月01日 17:01:45 -05:00
USAGE.md docs: Use generic RE API v2 language and cargo install instructions 2026年03月01日 17:01:45 -05:00

objfs

Distributed build cache for Rust using the Remote Execution API v2.

Features

  • Distributed caching -- Share build artifacts across machines
  • Remote execution -- Compile on worker machines, link locally
  • Auto-worker registration -- Every machine contributes to the cluster
  • C/C++ support -- Cache GCC and Clang compilations via objfs-cc-wrapper

Installation

cargo install --git https://github.com/nnunley/objfs

This installs three binaries: objfs, cargo-objfs-rustc, and objfs-cc-wrapper.

objfs intercepts rustc through Cargo's wrapper mechanism. No code changes required.

Usage

# Initialize a project
objfs init
# Local caching (zero config)
cargo build --release
# Shared cluster
export OBJFS_REMOTE_ENDPOINT="http://build-server:50051"
cargo build

See USAGE.md for configuration, CI/CD setup, and C/C++ integration.

How It Works

Developer Machines --> NativeLink Scheduler --> Worker Pool
 |
 CAS (artifacts) + AC (cache)
  1. cargo-objfs-rustc intercepts each rustc invocation
  2. Computes a cache key from source files and flags
  3. Checks the local cache, then the shared remote cache
  4. On a miss, submits the build to the scheduler or compiles locally
  5. Stores the result for reuse by any machine in the cluster

Documentation

Guides:

Reference:

License

MIT