Repository navigation
v0.1.0 - Zero-Copy Lock-Free IPC Ring Buffer & Shared Memory Bus
Changelog
All notable changes to ringfire will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[0.1.0] - 2026-09-21
Added
-
Core SPMC Ring Buffer: Lock-free single-producer multi-consumer ring buffer in
/dev/shmwith 128-byte cache-line alignedRingHeader, atomic Acquire/Release synchronization, and zero heap allocations. -
MPMC Ring Buffer: Multi-producer support with atomic ticket reservation (
claim_seq) and competing worker-queue consumers (MpmcQueueConsumer). -
LatestWins Overflow Policy: Non-blocking writer with zero stalls; lagged readers detect lapping (
RecvStatus::Lapped), track dropped metrics, and jump cleanly to active surviving stream frames. - Tear-Read Memory Safety: Two-phase seqlock validation ensuring zero torn reads during concurrent writer wraps.
-
Wait Strategies:
-
BusySpin: sub-20ns memory spin loop. -
YieldBackoff: adaptive OS thread yielding. -
Futex: Linux kernel sleep/wake with 0% CPU idle usage and atomicwaiting_consumersguard (0 syscalls during active streaming).
-
-
Tokio Async Integration (
AsyncRingConsumer):-
recv().awaitandrecv_batch(&mut [T]).await. - Adaptive spinning
$\to$ cooperativetokio::task::yield_now().await$\to$ async sleep, eliminating worker thread starvation. - Implementation of
futures_core::Stream.
-
-
Shared State Blackboard:
-
$O(1)$ state snapshot table (BlackboardProducer,BlackboardConsumer) in/dev/shm. - Per-slot 64-bit seqlock with 64-byte cache line alignment.
- Benchmarked at 4.09 ns read and 1.19 ns write on AMD Ryzen 9 7950X.
-
-
Polyglot Bindings:
- Pure C11 header
include/ringfire.hwith standalone inline functions and C-ABI export. - Zero-dependency Python package
python/ringfireusingmmapandctypes.Structure.
- Pure C11 header
-
Hardware Benchmarks: Comprehensive Criterion suite verified on AMD Ryzen 9 7950X (
booster), achieving 588M msg/s push throughput and 83M msg/s recv throughput.