Announcing Nexus: Low-latency primitives for high-performance systems
⚓ Rust 📅 2026-01-02 👤 surdeus 👁️ 1Hey everyone,
I wanted to share a project I've been working on called Nexus — a collection of low-latency data structures for systems where microseconds matter.
Background
I work in trading infrastructure where we target sub-100 microsecond end-to-end latency (market data tick to order out the door) at the p90 or even p99. With latency budgets that tight, every allocation, every cache miss, every unnecessary atomic operation counts. Over the years, I've found myself reaching for specialized primitives that don't quite exist in the ecosystem.
To be clear: the crates in the open source ecosystem are excellent. crossbeam and slab in particular have been foundational to my work and directly inspired this project. But I kept running into the same pattern — I needed something more constrained:
crossbeam::ArrayQueueis fantastic, but I never need MPMC. When you know you have exactly one producer and one consumer, there's performance left on the table.slabis great, but I need pre-allocation where exceeding capacity is a critical system error (reject the order), not something to handle gracefully with a resize. I also need hooks for things like huge pages andmlockbecause the slab is storing orders on an extremely hot path.
What's in Nexus
The project currently has four crates:
| Crate | What it does |
|---|---|
nexus-queue |
Lock-free SPSC ring buffer with per-slot lap counters |
nexus-channel |
Blocking SPSC channel with optimized parking |
nexus-slot |
Single-value conflation slot ("latest value wins") |
nexus-slab |
Pre-allocated slab with page-aligned memory, prefaulting, and mlock support |
A few more are planned: nexus-hash (integer-optimized hashers), nexus-pool (object pool over slab), nexus-id (snowflake ID generator), and nexus-ascii (fixed-capacity ASCII strings).
Philosophy
The core idea is specialization over generalization. These aren't general-purpose data structures — they're tuned primitives for specific access patterns. The constraints (SPSC, bounded, pre-allocated) aren't limitations to work around; they're what enable the performance.
If you need MPMC, use crossbeam — it's excellent. Nexus is for when you've profiled your system, identified the bottleneck, and need something purpose-built.
Looking for feedback
I've been tuning primarily on Intel x86-64 (Arch Linux), and I'd love help from folks with different hardware:
- AMD users — does the performance hold up?
- ARM/Apple Silicon — are there better memory ordering patterns?
- Anyone with ideas for the planned crates
I'm also just interested in general feedback. Is the philosophy resonating? Are there primitives you wish existed? Anything I'm missing?
GitHub: [GitHub - Abso1ut3Zer0/nexus: High Performance Data Structures]
Acknowledgments
This project wouldn't exist without the excellent work done by the maintainers of crossbeam and slab. Both crates have been foundational to my understanding of high-performance Rust, and several of the techniques in Nexus are directly inspired by their designs. Thank you for building such solid foundations for the community.
1 post - 1 participant
🏷️ Rust_feed