Architecture Overview¶
High-level architecture of the rninja system.
Components¶
graph TB
subgraph "Client Tools"
A[rninja CLI]
end
subgraph "Local Services"
B[rninja-daemon]
C[(Local Cache)]
end
subgraph "Remote Services"
D[rninja-cached]
E[(Remote Cache)]
end
A <-->|IPC| B
B <--> C
B <-->|NNG| D
D <--> E
Core Components¶
rninja CLI¶
Main user interface. Parses commands, connects to daemon, executes builds.
rninja-daemon¶
Long-running process that:
- Caches parsed manifests
- Manages build execution
- Coordinates cache access
rninja-cached¶
Remote cache server:
- Stores shared artifacts
- Handles authentication
- Manages storage
Data Flow¶
- User runs
rninja - CLI connects to daemon
- Daemon parses manifest (or uses cache)
- For each target:
- Compute cache key
- Check cache (local, then remote)
- Execute or restore
- Store result in cache
- Return results to CLI
Key Technologies¶
| Component | Technology |
|---|---|
| Runtime | Tokio (async) |
| Database | sled |
| Hashing | BLAKE3 |
| Network | NNG |
| Serialization | rkyv, MessagePack |