Ghost-Link ð
Ghost-Link is an open-source, zero-config LAN fabric that turns spare local GPUs into a shared execution surface for large-model inference and training. The system moves tensors directly over the local wire without forcing workloads through heavy orchestration layers or cloud subscriptions.
Features
- Zero-Copy Ring Buffers: SPSC (Single Producer / Single Consumer) DMA-style hand-off with backpressure
- Binary Protocol: Custom Layer-2 discovery protocol with EtherType
0x88B5and CRC32 checksums - Thread-Safe Cluster State: Lock-free node tracking with live metrics collection
- Adaptive Quantization: Automatic fallback to 8-bit or 4-bit when delivery health degrades
- Fault Tolerance: Heartbeat monitoring, automatic recovery, load rebalancing
- Terminal Dashboard: Live ASCII display with ratatui integration for production use
Quick Start
# Build the workspace
# Run unit tests
# Generate layer placement plan
# Join cluster with node ID
# Display ASCII dashboard
Architecture
Ghostlink/
âââ crates/
â âââ ghostlink-core/ # Shared runtime primitives
â â âââ ring.rs # Zero-copy SPSC ring buffer
â â âââ protocol.rs # Binary protocol with CRC32
â â âââ cluster.rs # Thread-safe node state
â â âââ planning.rs # Layer assignment + fault tolerance
â â âââ health.rs # Network health monitoring
â â âââ load_balance.rs # Tensor distribution
â â âââ xdp.rs # AF_XDP/eBPF integration (Linux)
â â âââ dashboard.rs # Terminal UI with ratatui
â âââ ghost-link/ # CLI demo entrypoint
âââ tests/ # Integration test suite
âââ docs/ # Documentation
â âââ ARCHITECTURE.md # Detailed design docs
â âââ TROUBLESHOOTING.md # Common issues and solutions
â âââ EXAMPLES.md # Usage examples
âââ README.md
Design Principles
- Zero-Copy / Low Latency: Prioritize zero-copy primitives, raw memory alignment, and minimal allocation in the hot path.
- No Bloat: Avoid heavy cloud-native orchestration frameworks. This is a bare-metal, raw frame LAN fabric.
- Idiomatic Rust: Enforce strict type safety, correct lifetime management for shared ring buffers, and explicit error handling without relying on unwrap().
Documentation
- ARCHITECTURE.md - Detailed design documentation
- TROUBLESHOOTING.md - Common issues and solutions
- EXAMPLES.md - Usage examples and best practices
- CONTRIBUTING.md - Guidelines for contributing
Examples
Layer Placement Plan
================================
)
)
delivery_ratio=0.98 => None
delivery_ratio=0.90 => Int8
delivery_ratio=0.75 => Int4
Join Cluster
====================================
ASCII Dashboard
| |
| |
| ) |
| >>> Streaming |
Testing
Unit Tests
# Run all unit tests
# Run specific crate tests
# Run with verbose output
Integration Tests
# Run integration tests
# Run with coverage report
Performance Baseline
Measured on x86_64 with Criterion (cargo bench -p ghostlink-core --bench criterion -- --warm-up-time 1 --measurement-time 1). GitHub Actions uploads the raw benchmark logs and Criterion report directory as artifacts.
Latest Criterion Run
| Benchmark | Latency | Throughput |
|---|---|---|
| Ring buffer push+pop round-trip (ST) | ~2.89-3.03 ns | ~330 M ops/s |
| Ring buffer push only (ST, full=drain) | ~1.89-1.98 ns | ~518 M ops/s |
Protocol: DiscoveryFrame encode |
~100.04-103.54 ns | ~9.7 M ops/s |
Protocol: DiscoveryFrame decode |
~102.50-103.81 ns | ~9.7 M ops/s |
| Protocol: encode + decode round-trip | ~210.21-219.03 ns | ~4.6 M ops/s |
| Planning: 33 layers across 2 nodes | ~164.90-170.18 ns | ~5.9 M ops/s |
| Planning: 80 layers across 8 nodes | ~344.28-354.76 ns | ~2.9 M ops/s |
Cluster: register node (update path) |
~179.57-186.40 ns | ~5.4 M ops/s |
Cluster: nodes_snapshot() (10 nodes) |
~9.78-10.28 ns | ~97 M ops/s |
Cluster: total_vram_gb() (10 nodes) |
~1.59-1.77 ns | ~600 M ops/s |
Run the baseline yourself:
# Build and run the Criterion benchmark harness
Note: The SPSC cross-thread figure includes OS scheduling overhead from
yield_now. Raw ring buffer latency for the single-threaded path remains sub-3 ns.
Benchmark artifacts are captured automatically in GitHub Actions under the Benchmarks workflow.
Dependencies
Core Dependencies
pin-utils- Zero-copy pinned allocationscrc32fast- Fast CRC32 checksumsarc-swap- Shared, lock-free snapshot readsthiserror- Error typestokio- Async runtime (for health monitoring)ratatui- Terminal UIanyhow- Production error handling
Dev Dependencies
tokio-test- Tokio testing utilitiescriterion- Benchmark harness for hot-path regression tracking
Platform Support
- Linux: Full support with AF_XDP/eBPF integration
- Windows/macOS: Standard socket implementation (AF_XDP not available)
Contributing
See CONTRIBUTING.md for guidelines on contributing to the project.
Areas for Contribution
- High Priority: AF_XDP/eBPF integration (Linux kernel wiring), real network health probes
- Medium Priority: Criterion-based micro-benchmarks, CI/CD pipeline
- Nice to Have: Additional examples, extended documentation
License
Ghost-Link is released under the MIT License to keep experimentation and enterprise adoption friction low.
Acknowledgments
This project is inspired by the need for a copy-paste local clustering workflow where workstations, gaming rigs, and rack servers can discover each other, advertise resources, and participate in a shared execution graph with a single command.
For more information, see the documentation.