[workspace]
members = [".", "python", "rebalancer", "broker", "risk"]
resolver = "2"

[package]
name = "nanobook"
version = "0.9.3"
edition = "2024"
rust-version = "1.85"
description = "Production-grade Rust execution infrastructure for automated trading: LOB engine, portfolio simulator, broker abstraction, risk engine"
license = "MIT"
repository = "https://github.com/ricardofrantz/nanobook"
homepage = "https://github.com/ricardofrantz/nanobook"
documentation = "https://docs.rs/nanobook"
readme = "README.md"
keywords = ["orderbook", "trading", "matching-engine", "risk-management", "execution"]
categories = ["simulation", "algorithms"]
authors = ["Ricardo Frantz"]

[dependencies]
thiserror = "2.0"
rustc-hash = "2.1"  # FxHash - fast non-cryptographic hash
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
rayon = { version = "1", optional = true }
memmap2 = { version = "0.9", optional = true }

[features]
default = ["event-log"]
event-log = []  # Enable event recording for replay (disable for max perf)
serde = ["dep:serde"]
persistence = ["serde", "event-log", "dep:serde_json"]
portfolio = []
parallel = ["portfolio", "dep:rayon"]
itch = ["persistence", "dep:memmap2"]

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1.5"

[[bin]]
name = "lob"
path = "src/bin/lob.rs"

[[bench]]
name = "throughput"
harness = false

[[bench]]
name = "portfolio"
harness = false
required-features = ["portfolio"]

[[bench]]
name = "stops"
harness = false
