[package]
name = "otc-rfq"
version = "0.1.0"
edition = "2021"
authors = ["Joaquin Bejar <jb@taunais.com>"]
description = "High-performance OTC Request-for-Quote engine supporting DeFi protocols and TradFi venues via FIX 4.4"
license = "MIT"
readme = "README.md"
repository = "https://github.com/joaquinbejar/otc-rfq.git"
keywords = ["otc", "rfq", "trading", "defi", "fix"]
categories = ["finance", "cryptography::cryptocurrencies"]

[workspace]
members = ["."]
resolver = "2"

[dependencies]
# Async runtime
tokio = { workspace = true }

# Web frameworks
axum = { workspace = true }
axum-extra = { workspace = true }
tonic = { workspace = true }
tower = { workspace = true }
tower-http = { workspace = true }

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
prost = { workspace = true }

# Database
sqlx = { workspace = true }

# Caching
redis = { workspace = true }

# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }

# Logging and tracing
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

# Types
uuid = { workspace = true }
rust_decimal = { workspace = true }
chrono = { workspace = true }

# Crypto and blockchain
ethers = { workspace = true }

# HTTP client
reqwest = { workspace = true }

# Authentication
jsonwebtoken = { workspace = true }

# Configuration
config = { workspace = true }
dotenvy = { workspace = true }

# Utilities
async-trait = { workspace = true }
futures = { workspace = true }
parking_lot = { workspace = true }
dashmap = { workspace = true }
bytes = { workspace = true }
toml = "0.9.11"
rand = "0.9.2"
tonic-prost = "0.14.3"
tokio-stream = "0.1.18"

# IronFix for FIX protocol (optional - enable when available)
# ironfix = { workspace = true }

# IronSBE for binary encoding (optional - enable when available)
# ironsbe = { workspace = true }

[build-dependencies]
tonic-build = { workspace = true }
tonic-prost-build = { workspace = true }
prost-build = { workspace = true }
# ironsbe-codegen = { workspace = true }

[dev-dependencies]
tokio-test = { workspace = true }
wiremock = { workspace = true }
proptest = { workspace = true }
testcontainers = { workspace = true }
criterion = { workspace = true }
serde_json = { workspace = true }

[workspace.dependencies]
# Async runtime
tokio = { version = "1.49", features = ["full", "tracing"] }

# Web frameworks
axum = { version = "0.8", features = ["ws", "macros"] }
axum-extra = { version = "0.12", features = ["typed-header"] }
tonic = { version = "0.14", features = ["transport", "tls-ring"] }
tower = { version = "0.5", features = ["full"] }
tower-http = { version = "0.6", features = ["cors", "trace", "compression-gzip"] }

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
prost = "0.14"

# Database
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "uuid", "chrono", "rust_decimal"] }

# Caching
redis = { version = "1.0", features = ["tokio-comp", "connection-manager"] }

# Error handling
thiserror = "2.0"
anyhow = "1.0"

# Logging and tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }

# Types
uuid = { version = "1.20", features = ["v4", "serde"] }
rust_decimal = { version = "1.40", features = ["serde", "serde-with-str"] }
chrono = { version = "0.4", features = ["serde"] }

# Crypto and blockchain
ethers = { version = "2.0", features = ["rustls"] }

# HTTP client
reqwest = { version = "0.13", features = ["json", "rustls"] }

# Authentication
jsonwebtoken = { version = "10.3", features = ["rust_crypto"] }

# Configuration
config = "0.15"
dotenvy = "0.15"

# Utilities
async-trait = "0.1"
futures = "0.3"
parking_lot = "0.12"
dashmap = "6.1"
bytes = "1.11"

# Build dependencies
tonic-build = "0.14"
tonic-prost-build = "0.14"
prost-build = "0.14"

# Dev dependencies
tokio-test = "0.4"
wiremock = "0.6"
proptest = "1.9"
testcontainers = "0.26"
criterion = { version = "0.8", features = ["async_tokio"] }

# IronFix for FIX protocol (optional - enable when available)
# ironfix = { git = "https://github.com/joaquinbejar/IronFix", branch = "main" }

# IronSBE for binary encoding (optional - enable when available)
# ironsbe = { git = "https://github.com/joaquinbejar/IronSBE", branch = "main" }
# ironsbe-codegen = { git = "https://github.com/joaquinbejar/IronSBE", branch = "main" }

[lints.rust]
unsafe_code = "deny"
missing_docs = "warn"

[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
indexing_slicing = "warn"
needless_collect = "warn"
unnecessary_to_owned = "warn"
clone_on_ref_ptr = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"

[profile.release]
overflow-checks = true
lto = "thin"
codegen-units = 1

[profile.dev]
overflow-checks = true

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