ghostlink_core/lib.rs
1//! Ghost-Link Core Library
2//!
3//! A zero-config LAN fabric that turns spare local GPUs into a shared execution surface
4//! for large-model inference and training.
5//!
6//! # Features
7//! - Zero-copy SPSC ring buffers for DMA-style hand-off
8//! - Binary protocol with CRC32 checksums for frame integrity
9//! - Thread-safe cluster state with metrics collection
10//! - Greedy layer assignment with fault tolerance
11//! - AF_XDP/eBPF socket integration (Linux)
12//! - Network health monitoring
13//! - Load balancing and tensor distribution
14//!
15//! # Architecture
16//! ```text
17//! crates/
18//! ├── ghostlink-core/ # Shared runtime primitives
19//! │ ├── ring.rs # Zero-copy SPSC ring buffer
20//! │ ├── protocol.rs # Binary protocol with CRC32
21//! │ ├── cluster.rs # Thread-safe node state
22//! │ ├── planning.rs # Layer assignment + fault tolerance
23//! │ ├── health.rs # Network health monitoring
24//! │ ├── load_balance.rs # Tensor distribution
25//! │ ├── xdp.rs # AF_XDP/eBPF integration (Linux)
26//! │ └── dashboard.rs # Terminal UI with ratatui
27//! └── ghost-link/ # CLI demo entrypoint
28//! ```
29
30pub mod cluster;
31pub mod dashboard;
32pub mod health;
33pub mod load_balance;
34pub mod planning;
35pub mod protocol;
36pub mod ring;
37pub mod xdp;
38
39// Re-export common types for convenience
40pub use cluster::{ClusterState, NodeMetrics, NodeStatus};
41pub use planning::{
42 assign_layers_sequentially, select_quantization_mode, LayerAssignment, LayerSpec,
43 PlacementPlan, QuantizationMode,
44};
45pub use protocol::NodeResources;
46pub use ring::{RingConfig, SpscRingBuffer};