Expand description
Ghost-Link Core Library
A zero-config LAN fabric that turns spare local GPUs into a shared execution surface for large-model inference and training.
§Features
- Zero-copy SPSC ring buffers for DMA-style hand-off
- Binary protocol with CRC32 checksums for frame integrity
- Thread-safe cluster state with metrics collection
- Greedy layer assignment with fault tolerance
- Experimental XDP scaffolding (currently unavailable in this build)
- Network health monitoring
- Load balancing and tensor distribution
§Architecture
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
│ ├── kv_cache.rs # KV cache primitive (no current caller — see module docs)
│ ├── xdp.rs # Experimental XDP scaffolding (stubbed)
│ └── dashboard.rs # Terminal UI with ratatui
└── ghost-link/ # CLI demo entrypointRe-exports§
pub use accelerator::ExecutionBackend;pub use autotune::AutoTuner;pub use cluster::ClusterState;pub use cluster::NodeMetrics;pub use cluster::NodeStatus;pub use discovery::broadcast_and_collect;pub use discovery::UdpDiscoveryConfig;pub use discovery::DEFAULT_DISCOVERY_PORT;pub use host::detect_local_node_resources;pub use host::detect_runtime_profile;pub use host::detect_runtime_profile_full;pub use host::detect_runtime_profile_with_mode;pub use host::infer_compute_capability_from_name;pub use host::is_apple_silicon;pub use host::AccelerationMode;pub use host::GpuBackend;pub use host::ProbeMode;pub use host::RuntimeProfile;pub use kv_cache::KVCacheConfig;pub use kv_cache::KVCacheEntry;pub use kv_cache::LayerKvCache;pub use planning::assign_layers_sequentially;pub use planning::assign_layers_with_fault_tolerance_and_runtime;pub use planning::assign_layers_with_runtime_profile;pub use planning::chunk_assignments_for_workers;pub use planning::select_quantization_mode;pub use planning::LayerAssignment;pub use planning::LayerSpec;pub use planning::PlacementPlan;pub use planning::PlanningTuning;pub use planning::QuantizationMode;pub use protocol::NodeResources;pub use ring::RingConfig;pub use ring::SpscRingBuffer;pub use runtime::build_token_schedule;pub use runtime::execute_pipeline;pub use runtime::execute_pipeline_tcp_loopback;pub use runtime::execute_pipeline_tcp_loopback_with_config;pub use runtime::BridgeAddr;pub use runtime::BridgeListener;pub use runtime::BridgeStream;pub use runtime::DeviceKind;pub use runtime::ExecutionResult;pub use runtime::PipelinePlan;pub use runtime::StageExecutionStats;pub use runtime::StagePlacement;pub use runtime::TcpTransportConfig;pub use runtime::TokenStep;pub use runtime::TransportKind;pub use system_profile::CpuFeatures;pub use system_profile::CpuInfo;pub use system_profile::GpuInfo;pub use system_profile::MemoryInfo;pub use system_profile::NetworkInfo;pub use system_profile::NpuInfo;pub use system_profile::SystemProfile;pub use watcher::ProfileChange;pub use watcher::SystemProfileWatcher;
Modules§
- accelerator
- Runtime-selected execution backend helpers.
- autotune
- Unified auto-tuning for Ghost-Link subsystems.
- cluster
- Thread-Safe Cluster State with Metrics Collection
- dashboard
- Terminal Dashboard with ratatui Integration for Ghost-Link Cluster
- discovery
- UDP discovery fallback for mixed LAN environments.
- health
- Network Health Monitoring for Ghost-Link Cluster
- host
- Host resource detection and runtime auto-tuning.
- kv_
cache - KV cache primitives for a single sequence within a single transformer layer.
- load_
balance - Tensor Distribution and Load Balancing for Ghost-Link Cluster
- mdns
- mDNS-based peer discovery — an alternative path to the UDP broadcast
fallback in
discovery.rsfor networks where broadcast traffic is filtered but multicast is not (some managed VLANs, cloud VPCs). Runs alongside UDP discovery rather than replacing it: callers typically merge results from both. - models
- Model Registry and Asset Management
- planning
- Greedy Layer Assignment with Fault Tolerance and Adaptive Quantization
- protocol
- Binary Protocol with CRC32 Checksums for Ghost-Link Discovery
- ring
- Zero-Copy SPSC Ring Buffer with AF_XDP Integration
- runtime
- Distributed inference runtime scaffolding.
- system_
profile - Unified system profile: single source of truth for host capabilities.
- watcher
- Dynamic system-profile watcher for hot-plug hardware detection.