Back
29/65
Lesson 29
8 min
RCH: Remote Compilation
Offload Rust builds to remote workers for faster compilation
Ready to level up?
Mark complete to track your learning progress.
Offload Rust builds to remote workers for faster compilation
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 cargo commands and routes them to powerful remote build servers. Your local machine stays responsive while heavy Rust 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
Works via Claude Code hook
rsync + zstd compression
Priority-based scheduling
RCH intercepts cargo commands via a Claude Code hook 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]]name = "build-server-1"host = "ubuntu@192.168.1.100"slots = 48priority = 100tags = ["fast", "baremetal"][[workers]]name = "build-server-2"host = "ubuntu@192.168.1.101"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# Set default workerrch config set default_worker=build-server-1# 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