Back
29/61
Lesson 29
8 min

RCH: Remote Compilation

Offload Rust builds to remote workers for faster compilation

New to ACFS?

Complete the setup wizard first to get the most from these lessons.

Go to Choose Your OS
Goal

Offload Rust builds to remote workers for faster compilation in multi-agent workflows.

What Is RCH?

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.

Remote Workers

Build on powerful remote servers

Transparent

Works via Claude Code hook

Fast Sync

rsync + zstd compression

Worker Pool

Priority-based scheduling

How It Works

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.

Fleet:8/8
Cores:320
Active:0
Avg CPU:6%
Network Topology
LocalMachineRCHDispatcherW-148cW-248cW-332cW-432cW-516cW-616cW-764cW-864c
alpha-01
10.0.1.1012ms
CPU2%
RAM8%
alpha-02
10.0.1.1115ms
CPU3%
RAM10%
bravo-01
10.0.2.1018ms
CPU4%
RAM12%
bravo-02
10.0.2.1121ms
CPU5%
RAM14%
charlie-01
10.0.3.1024ms
CPU6%
RAM16%
charlie-02
10.0.3.1127ms
CPU7%
RAM18%
delta-01
10.0.4.1030ms
CPU8%
RAM20%
delta-02
10.0.4.1133ms
CPU9%
RAM22%
Build Queue

No jobs in queue

rch terminal
$ rch status
RCH Remote Compilation Helper v3.2.0
 
Fleet: 8/8 workers online
Queue: 0 jobs pending
Daemon: running (pid 4821)
 
All systems nominal.
Build Flow
# Local: You run cargo build
cargo 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
Pro Tip
The hook is transparent. You run normal cargo commands and RCH handles the rest.

Quick Start

Get started with these essential commands.

Install the Claude Code hook
Start the local daemon
Add a remote worker
Check system status
Warning
Make sure SSH keys are set up for passwordless access to workers before adding them.

Worker Management

RCH supports multiple remote workers with priority-based scheduling.

Add a new worker
List configured workers
Check worker connectivity
Verify all workers are reachable
~/.config/rch/workers.toml
# Workers are stored in ~/.config/rch/workers.toml
[[workers]]
name = "build-server-1"
host = "ubuntu@192.168.1.100"
slots = 48
priority = 100
tags = ["fast", "baremetal"]
[[workers]]
name = "build-server-2"
host = "ubuntu@192.168.1.101"
slots = 16
priority = 80
tags = ["secondary"]

Diagnostics

RCH includes comprehensive diagnostics to troubleshoot issues.

Run full diagnostic check
Auto-fix common issues
Check if daemon is running
View current configuration
Pro Tip
Run rch doctor if builds aren't being offloaded. It checks prerequisites, configuration, and worker connectivity.

Configuration

RCH configuration lives in ~/.config/rch/.

Configuration Commands
# View current config
rch config show
# Set default worker
rch config set default_worker=build-server-1
# Update RCH binaries on all workers
rch update --remote
Note
Keep workers in sync with rch update --remote after updating the local RCH binary.

Tool Integration

RCH integrates seamlessly with other flywheel tools.

RCH + NTM

Agents spawned by NTM automatically use RCH for their builds. Multiple agents can compile in parallel without overwhelming local CPU.

RCH + RU

RU syncs repos that RCH then builds remotely. Use ru sync to update sources, then build with RCH-accelerated cargo.

RCH + Beads

Track build-related tasks via beads. Create issues for build failures or optimization opportunities.

Best Practices

Get the most out of RCH with these recommendations.

SSH Keys

Set up passwordless SSH access

Fast Workers

Use servers with many CPU cores

Keep Synced

Update workers with rch update --remote

Monitor Status

Check rch status regularly

Ready to level up?

Mark complete to track your learning progress.