11 unstable releases (3 breaking)
| 0.4.2 | Feb 6, 2026 |
|---|---|
| 0.4.1 | Feb 6, 2026 |
| 0.4.0 | Jan 25, 2026 |
| 0.3.2 | Jan 21, 2026 |
| 0.1.3 | Dec 17, 2025 |
#771 in Concurrency
73 downloads per month
Used in 8 crates
(3 directly)
1.5MB
33K
SLoC
ringkernel-cpu
CPU backend implementation for RingKernel.
Overview
This crate provides a CPU-based implementation of the RingKernelRuntime trait. It serves two purposes:
- Development and Testing: Test kernel logic without GPU hardware
- Fallback: Run on systems without GPU support
The CPU backend implements the full RingKernel API including kernel lifecycle, message queues, HLC timestamps, and K2K messaging.
Usage
use ringkernel_cpu::CpuRuntime;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let runtime = CpuRuntime::new().await?;
let kernel = runtime.launch("worker", LaunchOptions::default()).await?;
// Process messages...
kernel.terminate().await?;
runtime.shutdown().await?;
Ok(())
}
Features
- Full
RingKernelRuntimeimplementation - Lock-free message queues using crossbeam
- HLC timestamp generation
- K2K messaging support
- Kernel lifecycle management (Created, Active, Paused, Terminated)
Performance
The CPU backend is optimized for correctness over performance. For production workloads requiring high throughput, use the CUDA or WebGPU backends.
Typical performance characteristics:
- Message throughput: ~10M messages/sec
- Latency: <1ms per message batch
Testing
cargo test -p ringkernel-cpu
When to Use
- Unit testing kernel logic
- Development without GPU hardware
- CI/CD pipelines
- Systems without GPU support
- Debugging message flow
License
Apache-2.0
Dependencies
~17MB
~221K SLoC