rt_hft_engine/
lib.rs

1//! # RT HFT Engine
2//!
3//! Sub-microsecond high-frequency trading engine optimized for vintage hardware.
4//!
5//! ## Performance Achievements
6//!
7//! Tested on Dell XPS 13 9350 (2015):
8//! - **337 nanoseconds** minimum latency
9//! - **3.3 microseconds** average latency  
10//! - **8.7 microseconds** P99 latency
11//! - **±0.8 microseconds** jitter
12//!
13//! ## Hardware Stack
14//!
15//! - **CPU**: Intel i7-6560U Skylake (2C/4T @ 2.2GHz)
16//! - **RAM**: 8GB DDR4-2133 
17//! - **Network**: Intel AX210 WiFi 6E
18//! - **Storage**: 256GB NVMe SSD
19//! - **Total Cost**: ~$500 (used, 2015)
20//!
21//! ## Software Optimizations
22//!
23//! - **OS**: CachyOS (Arch Linux based)
24//! - **Kernel**: linux-cachyos-bore 6.11+ (RT-PREEMPT)
25//! - **TCP**: BBRv3 congestion control
26//! - **Scheduler**: BORE (Burst-Oriented Response Enhancer)
27//! - **Language**: Rust 1.70+ (zero-cost abstractions)
28
29#![deny(unsafe_code)]
30#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
31
32pub mod engine;
33pub mod order_book; 
34pub mod market_data;
35pub mod execution;
36pub mod strategy;
37pub mod risk;
38
39// Re-exports
40pub use engine::{HFTEngine, EngineConfig, EngineError};
41pub use order_book::{OrderBook, Order, OrderSide, OrderType};
42
43/// Main result type for engine operations
44pub type Result<T> = std::result::Result<T, EngineError>;
45
46/// Version information  
47pub const VERSION: &str = env!("CARGO_PKG_VERSION");