ghostlink-core 1.17.0

Core runtime primitives for Ghostlink, including planning, routing, health monitoring, and transport logic for distributed inference workloads.
Documentation
//! 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
//! ```text
//! 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 entrypoint
//! ```

pub mod accelerator;
pub mod api_response_cache;
pub mod autotune;
pub mod circuit_breaker;
pub mod cluster;
pub mod dashboard;
pub mod discovery;
pub mod health;
pub mod host;
pub mod kv_cache;
pub mod load_balance;
pub mod mdns;
pub mod models;
pub mod planning;
pub mod protocol;
pub mod ring;
pub mod runtime;
pub mod system_profile;
pub mod watcher;
#[doc(hidden)]
pub mod xdp;

// Re-export common types for convenience
pub use accelerator::ExecutionBackend;
pub use api_response_cache::{ApiResponseCache, CacheStats};
pub use autotune::AutoTuner;
pub use circuit_breaker::{CircuitBreaker, CircuitBreakerConfig, CircuitState, JitteredBackoff};
pub use cluster::{ClusterState, NodeMetrics, NodeStatus};
pub use discovery::{broadcast_and_collect, UdpDiscoveryConfig, DEFAULT_DISCOVERY_PORT};
pub use host::{
    detect_local_node_resources, detect_runtime_profile, detect_runtime_profile_full,
    detect_runtime_profile_with_mode, infer_compute_capability_from_name, is_apple_silicon,
    AccelerationMode, GpuBackend, ProbeMode, RuntimeProfile,
};
pub use kv_cache::{KVCacheConfig, KVCacheEntry, LayerKvCache};
pub use planning::{
    assign_layers_sequentially, assign_layers_with_fault_tolerance_and_runtime,
    assign_layers_with_runtime_profile, chunk_assignments_for_workers, select_quantization_mode,
    LayerAssignment, LayerSpec, PlacementPlan, PlanningTuning, QuantizationMode,
};
pub use protocol::NodeResources;
pub use ring::{RingConfig, SpscRingBuffer};
pub use runtime::{
    build_token_schedule, execute_pipeline, execute_pipeline_tcp_loopback,
    execute_pipeline_tcp_loopback_with_config, BridgeAddr, BridgeListener, BridgeStream,
    DeviceKind, ExecutionResult, PipelinePlan, StageExecutionStats, StagePlacement,
    TcpTransportConfig, TokenStep, TransportKind,
};
pub use system_profile::{
    CpuFeatures, CpuInfo, GpuInfo, MemoryInfo, NetworkInfo, NpuInfo, SystemProfile,
};
pub use watcher::{ProfileChange, SystemProfileWatcher};