RSX Crates

Description, benchmarks, comparisons, and demo for each crate -- read live from ARCHITECTURE.md / reports/ / compare/ on disk.

rsx-cast

Reliable UDP whose retransmit source IS the WAL the producer writes for audit and replay.

rsx-book

The orderbook. Matching an order costs the same whether the book holds a hundred orders or ten million.

rsx-matching

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.

rsx-risk

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.

rsx-gateway

WebSocket gateway binary. Client-facing order entry point.

rsx-marketdata

Market data binary. Publishes L2 depth, BBO, and trades over WebSocket.

rsx-mark

Mark price aggregator binary. Feeds mark prices to Risk.

rsx-types

Foundation crate: fixed-point Price/Qty newtypes, order enums, symbol config, panic handling, and the cache/CPU helpers every pinned tile needs.

rsx-messages

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.

rsx-recorder

Archival replication consumer process. Receives all WAL records over TCP replication and writes date-partitioned archive files for long-term durability.

rsx-cli

WAL dump/inspect tool (clap CLI) — read and decode records off disk for debugging and audit.

rsx-log

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.

rsx-health

Health/metrics primitive: a shared Arc<LoadGauges> the daemon writes on its hot path and a separate thread reads to serve /health /ready /metrics.

rsx-tui

Trade surface: a ratatui trading terminal — orderbook ladder, order entry, positions/fills over the gateway WS.