Experiments in low-level Rust — lock-free data structures, custom synchronization primitives, and other latency-critical building blocks.
Each subfolder is a standalone project with its own README and tests.
-
spinlock — A custom
Spinlock<T>built fromAtomicBool+UnsafeCell+ an RAII guard. Test-and-test-and-set acquire loop, Acquire/Release fences, and ~60 lines of justifiedunsafe. -
spsc — A lock-free single-producer single-consumer ring buffer. No CAS, no mutex — just plain atomic load/store with the right memory ordering. Strictly faster than MPMC for two-stage pipelines.
Building these primitives from scratch is the fastest way to actually understand how concurrency, memory ordering, and unsafe work in Rust — far more than reading about them. Each project is small, self-contained, and documented with the reasoning behind every design choice.
MIT