ringkernel-core
Core traits and types for the RingKernel GPU-native actor system.
Overview
This crate provides the foundational abstractions that all RingKernel backends implement. It defines the message passing protocols, kernel lifecycle management, and synchronization primitives.
Core Abstractions
Messages
use *;
// Messages must be serializable for GPU transfer
Kernel Runtime
Control Block
128-byte GPU-resident structure for kernel lifecycle management:
Key Components
| Component | Description |
|---|---|
RingMessage |
Trait for GPU-transferable messages |
MessageQueue |
Lock-free ring buffer for message passing |
KernelHandle |
Handle to manage kernel lifecycle |
ControlBlock |
GPU-resident kernel state |
HlcTimestamp |
Hybrid Logical Clock for causal ordering |
K2KBroker |
Kernel-to-kernel messaging broker |
PubSubBroker |
Topic-based publish/subscribe |
Hybrid Logical Clocks
Provides causal ordering across distributed operations:
use ;
let clock = new;
let ts1 = clock.tick;
let ts2 = clock.tick;
assert!;
// Synchronize with remote timestamp
let synced = clock.update?;
Kernel-to-Kernel Messaging
Direct communication between kernels without host involvement:
let broker = new;
let endpoint = broker.register;
endpoint.send.await?;
Testing
The crate includes 65+ tests covering message serialization, queue operations, HLC ordering, and K2K messaging.
License
Apache-2.0