RSX Crates
Description, benchmarks, comparisons, and demo for each crate -- read live from ARCHITECTURE.md / reports/ / compare/ on disk.
Reliable UDP whose retransmit source IS the WAL the producer writes for audit and replay.
The orderbook. Matching an order costs the same whether the book holds a hundred orders or ten million.
The matching engine. Pairs each order against the resting book, records the fills, fans them out — a flat ~30 ns match, price-agnostic, one core-pinned loop per symbol.
The pre-trade gate. Vets every order's margin before it can reach the book, in ~110 ns — what stops one blown-up trader from taking the exchange down; one instance per user shard.
WebSocket gateway binary. Client-facing order entry point.
Market data binary. Publishes L2 depth, BBO, and trades over WebSocket.
Mark price aggregator binary. Feeds mark prices to Risk.
Foundation crate: fixed-point Price/Qty newtypes, order enums, symbol config, panic handling, and the cache/CPU helpers every pinned tile needs.
The RSX wire records (Fill/BBO/Order*/…): fixed-layout #[repr(C, align(64))] structs with one CastRecord impl each, on top of rsx-cast. No runtime, no I/O.
Archival replication consumer process. Receives all WAL records over TCP replication and writes date-partitioned archive files for long-term durability.
WAL dump/inspect tool (clap CLI) — read and decode records off disk for debugging and audit.
Off-hot-path logging primitive: many hot threads push fixed-shape records onto wait-free SPSC rings; one drain thread sweeps them into tracing events.
Health/metrics primitive: a shared Arc<LoadGauges> the daemon writes on its hot path and a separate thread reads to serve /health /ready /metrics.
Trade surface: a ratatui trading terminal — orderbook ladder, order entry, positions/fills over the gateway WS.