RingKernel
A GPU-native persistent actor model framework for Rust. Build high-performance GPU-accelerated actor systems with persistent kernels, lock-free message passing, and hybrid logical clocks.
🚀 Persistent GPU Kernels
Long-running GPU kernels that maintain state across invocations, eliminating launch overhead.
🔗 Lock-free Message Passing
High-performance ring buffers for host-GPU and kernel-to-kernel communication.
⏱ Hybrid Logical Clocks
Causal ordering across distributed operations with HLC timestamps.
📦 Zero-Copy Serialization
Efficient message passing with rkyv-based zero-copy serialization.
💻 Multi-Backend Support
Target CPU, CUDA, WebGPU, or Metal with a unified API.
🎯 Proc Macro DSL
Declarative message and kernel definitions with derive macros.
use ringkernel::prelude::*;
async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
// Create runtime with auto-detected backend
let runtime = RingKernel::builder()
.backend(Backend::Auto)
.build()
.await?;
// Launch a persistent kernel
let kernel = runtime.launch("processor", LaunchOptions::default()).await?;
// Kernel is active and ready
println!("State: {:?}", kernel.state());
runtime.shutdown().await?;
Ok(())
}
Supported Backends
| Backend | Status | Platforms | Requirements |
|---|---|---|---|
| CPU | Stable | All | None |
| CUDA | Stable | Linux, Windows | NVIDIA GPU, CUDA 12.x |
| WebGPU | Stable | All | Vulkan/Metal/DX12 capable GPU |
| Metal | Planned | macOS, iOS | - |
Documentation
Guide
Architecture Overview
System design, component mapping, and kernel lifecycle.
Crate Structure
Workspace organization and crate responsibilities.
Core Abstractions
Key traits, types, and the message queue system.
Memory Management
GPU memory allocation and buffer handling.
GPU Backends
Backend implementations: CPU, CUDA, WebGPU, Metal.
Serialization
Zero-copy serialization with rkyv and zerocopy.
Proc Macros
RingMessage, ring_kernel, and GpuType derive macros.
Runtime
Runtime configuration and kernel management.
Testing
Testing strategies and GPU test patterns.
Performance
Benchmarks, optimization, and profiling.
Ecosystem
Integration with other Rust libraries.
Migration Guide
Upgrading between versions.
CUDA Codegen
Rust to CUDA transpiler documentation.
WGSL Codegen
Rust to WGSL transpiler documentation.
Showcase Applications
WaveSim, TxMon, and AccNet demos with screenshots.