Back
29/65
Lesson 29
8 min
RCH: Remote Compilation
Offload Rust, Go, C/C++ and Bun builds to remote workers
Ready to level up?
Mark complete to track your learning progress.
Offload Rust, Go, C/C++ and Bun builds to remote workers
Mark complete to track your learning progress.
Offload Rust builds to remote workers for faster compilation in multi-agent workflows.
RCH (Remote Compilation Helper) transparently intercepts build commands (cargo, go, gcc/clang, make/cmake/ninja, bun/tsc, nix) and routes them to powerful remote build servers. Your local machine stays responsive while heavy compilations run elsewhere.
When running multiple AI agents that all trigger builds, your local CPU becomes a bottleneck. RCH solves this by syncing source to remote workers, building there, and streaming artifacts back.
Build on powerful remote servers
Claude Code hook plus a cargo shim for other agents
rsync + zstd compression
Priority-based scheduling
RCH intercepts build commands via a Claude Code hook (or its cargo shim) and offloads them to remote workers.
Compilation Fleet Dashboard
Step through scenarios to see how RCH manages remote compilation across a worker fleet
All 8 worker nodes online and idle. Fleet is healthy and ready to accept build jobs.
No jobs in queue
# Local: You run cargo buildcargo build --release↓# RCH Hook intercepts the command↓# Source synced to worker via rsync↓# Remote: Build runs on powerful server↓# Artifacts synced back to local machine
Get started with these essential commands.
RCH supports multiple remote workers with priority-based scheduling.
# Workers are stored in ~/.config/rch/workers.toml[[workers]]id = "build-server-1"host = "192.168.1.100"user = "ubuntu"identity_file = "~/.ssh/id_ed25519"total_slots = 48priority = 100tags = ["fast", "baremetal"][[workers]]id = "build-server-2"host = "192.168.1.101"user = "ubuntu"identity_file = "~/.ssh/id_ed25519"total_slots = 16priority = 80tags = ["secondary"]
RCH includes comprehensive diagnostics to troubleshoot issues.
rch doctor if builds aren't being offloaded. It checks prerequisites, configuration, and worker connectivity.RCH configuration lives in ~/.config/rch/.
# View current configrch config show# Change a setting (key and value are separate arguments)rch config set general.log_level debug# Update RCH binaries locally and on all workersrch update --fleet
rch update --fleet, which updates the local RCH binary and every configured worker.RCH integrates seamlessly with other flywheel tools.
Agents spawned by NTM automatically use RCH for their builds. Multiple agents can compile in parallel without overwhelming local CPU.
RU syncs repos that RCH then builds remotely. Use ru sync to update sources, then build with RCH-accelerated cargo.
Track build-related tasks via beads. Create issues for build failures or optimization opportunities.
Get the most out of RCH with these recommendations.
Set up passwordless SSH access
Use servers with many CPU cores
Update workers with rch update --fleet
Check rch status regularly