Distributed build cache for Rust using the Remote Execution API v2.
- 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
cargo install --git https://github.com/nnunley/objfsThis installs three binaries: objfs, cargo-objfs-rustc, and objfs-cc-wrapper.
objfs intercepts rustc through Cargo's wrapper mechanism. No code changes required.
# Initialize a project
objfs init
# Local caching (zero config)
cargo build --release
# Shared cluster
export OBJFS_REMOTE_ENDPOINT="http://build-server:50051"
cargo buildSee USAGE.md for configuration, CI/CD setup, and C/C++ integration.
Developer Machines --> NativeLink Scheduler --> Worker Pool
|
CAS (artifacts) + AC (cache)
cargo-objfs-rustcintercepts eachrustcinvocation- Computes a cache key from source files and flags
- Checks the local cache, then the shared remote cache
- On a miss, submits the build to the scheduler or compiles locally
- Stores the result for reuse by any machine in the cluster
Guides:
- Remote Execution -- Distributed builds
- Worker Setup -- NativeLink worker configuration
- CI/CD Integration -- GitHub Actions, GitLab CI
- C/C++ Integration -- CMake, Make builds
Reference:
- Architecture -- Technical details
- Linking Strategy -- Platform-compatible linking
- Auto-Worker Registration -- Zero-config clustering
- Roadmap -- C/C++ feature tracking
MIT