Skip to content

nnunley/objfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Distributed build cache for Rust using the Remote Execution API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages