| name | rch |
| description | Remote compilation helper. Use when: rch doctor, workers.toml, "no workers", "compilation slow", fleet deploy, self-test, or offload cargo/gcc/bun. |
RCH — Remote Compilation Helper
Transparently offloads cargo build, bun test, gcc to remote workers. Same commands, faster builds.
Diagnosis Loop
rch doctor
rch doctor --fix
rch doctor --verbose
If --fix can't solve it → see Quick Fixes or references.
Quick Fixes (Copy-Paste)
| Symptom | Command |
|---|
| SSH auth fails | eval $(ssh-agent) && ssh-add ~/.ssh/your_key |
| Daemon not running | rm -f /tmp/rch.sock && rchd & |
| Hook not installed | rch hook install --force |
| No workers available | vim ~/.config/rch/workers.toml (add workers) |
| Socket permission | rm /tmp/rch.sock && rchd |
| Stale socket | lsof /tmp/rch.sock → kill stale process |
Worker Config (~/.config/rch/workers.toml)
[[workers]]
id = "builder"
host = "192.168.1.100"
user = "ubuntu"
identity_file = "~/.ssh/id_ed25519"
total_slots = 8
priority = 100
tags = ["rust", "bun"]
Auto-Discover from SSH Config
rch workers discover --from-ssh-config --dry-run
rch workers discover --from-ssh-config
Verify Workers
rch workers probe --all
rch workers probe worker1 -v
rch workers list
Fresh Install Checklist
Supported Commands (Auto-Offloaded)
| Category | Commands |
|---|
| Rust | cargo build, cargo test, cargo check, rustc |
| Bun | bun test, bun typecheck |
| C/C++ | gcc, g++, clang, make, cmake, ninja |
Never offloaded: bun install, cargo fmt, piped/background commands.
Debug
RCH_LOG=debug cargo build
RCH_DRY_RUN=1 cargo check
rch doctor --json > diag.json
Fleet Operations
rch fleet status
rch fleet preflight --all
rch fleet deploy --all
rch self-test
Anti-Patterns
| Don't | Why | Do Instead |
|---|
| Run daemon as root | Security risk | systemctl --user start rchd |
Skip rch doctor | Miss config issues | Always verify first |
Use --force blindly | May break hook | Check rch hook status first |
| Ignore transfer errors | Indicates network/disk issues | Check worker disk space, network |
References