# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "nanobook"
version = "0.9.3"
authors = ["Ricardo Frantz"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Production-grade Rust execution infrastructure for automated trading: LOB engine, portfolio simulator, broker abstraction, risk engine"
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",
]
license = "MIT"
repository = "https://github.com/ricardofrantz/nanobook"
resolver = "2"

[features]
default = ["event-log"]
event-log = []
itch = [
    "persistence",
    "dep:memmap2",
]
parallel = [
    "portfolio",
    "dep:rayon",
]
persistence = [
    "serde",
    "event-log",
    "dep:serde_json",
]
portfolio = []
serde = ["dep:serde"]

[lib]
name = "nanobook"
path = "src/lib.rs"

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

[[example]]
name = "basic_usage"
path = "examples/basic_usage.rs"

[[example]]
name = "demo_quick"
path = "examples/demo_quick.rs"

[[example]]
name = "ioc_execution"
path = "examples/ioc_execution.rs"

[[example]]
name = "market_making"
path = "examples/market_making.rs"

[[example]]
name = "multi_symbol_lob"
path = "examples/multi_symbol_lob.rs"

[[example]]
name = "portfolio_backtest"
path = "examples/portfolio_backtest.rs"

[[test]]
name = "edge_cases"
path = "tests/edge_cases.rs"

[[test]]
name = "portfolio_invariants"
path = "tests/portfolio_invariants.rs"

[[test]]
name = "proptest_invariants"
path = "tests/proptest_invariants.rs"

[[test]]
name = "safety_tests"
path = "tests/safety_tests.rs"

[[bench]]
name = "portfolio"
path = "benches/portfolio.rs"
harness = false
required-features = ["portfolio"]

[[bench]]
name = "stops"
path = "benches/stops.rs"
harness = false

[[bench]]
name = "throughput"
path = "benches/throughput.rs"
harness = false

[dependencies.memmap2]
version = "0.9"
optional = true

[dependencies.rayon]
version = "1"
optional = true

[dependencies.rustc-hash]
version = "2.1"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.thiserror]
version = "2.0"

[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]

[dev-dependencies.proptest]
version = "1.5"
