[package]
name = "hotpath"
version = "0.21.0"
edition = "2021"
repository = "https://github.com/pawurb/hotpath-rs"
description = "One profiler for CPU, time, memory, SQL, and async code - quickly find and debug performance bottlenecks."
readme = "../../README.md"
license = "MIT"
categories = ["development-tools"]

[[bin]]
name = "hotpath"
path = "bin/hotpath/main.rs"
required-features = ["tui"]

[[bin]]
name = "hotpath-utils"
path = "bin/hotpath-utils/main.rs"
required-features = ["utils"]

[[bin]]
name = "hotpath-crashtest"
path = "bin/hotpath-crashtest/main.rs"
required-features = ["tui", "hotpath", "hotpath-alloc"]

[[bin]]
name = "hotpath-samply"
path = "bin/hotpath-samply/main.rs"

[features]
default = ["threads"]
hotpath = [
  "hotpath-macros/hotpath",
  "dep:arc-swap",
  "dep:cfg-if",
  "dep:crossbeam-channel",
  "dep:hdrhistogram",
  "dep:prettytable-rs",
  "dep:quanta",
  "dep:regex",
  "dep:serde",
  "dep:serde_json",
  "dep:tiny_http",
  "dep:futures-util",
  "dep:pin-project-lite",
  "dep:libc",
]
hotpath-meta = ["dep:hotpath-meta", "hotpath-meta/hotpath-meta", "hotpath-meta/crossbeam"]
hotpath-alloc-meta = ["hotpath-meta/hotpath-alloc-meta"]
hotpath-mcp-meta = ["hotpath-meta/hotpath-mcp-meta"]
hotpath-alloc = ["dep:tokio", "hotpath-meta?/hotpath-alloc"]
utils = ["dep:serde", "dep:serde_json", "dep:eyre", "dep:clap", "dep:prettytable-rs", "dep:ureq"]
tui = ["dep:serde", "dep:serde_json", "dep:eyre", "dep:clap", "dep:prettytable-rs", "dep:reqwest", "dep:crossterm", "dep:ratatui", "dep:crossbeam-channel", "dep:tokio", "tokio/rt", "crossbeam"]
demo-sql = ["hotpath", "sqlx", "dep:sqlx", "diesel", "diesel/sqlite", "dep:libsqlite3-sys"]
tokio = ["dep:tokio", "tokio/sync", "tokio/macros", "tokio/rt-multi-thread", "tokio/time"]
futures = ["dep:tokio", "tokio/sync", "tokio/macros", "tokio/rt-multi-thread", "dep:futures-channel"]
async-channel = ["dep:tokio", "tokio/sync", "tokio/macros", "tokio/rt-multi-thread", "dep:async-channel"]
crossbeam = ["dep:crossbeam-channel"]
parking_lot = ["dep:parking_lot"]
async-lock = ["dep:async-lock"]
flume = ["dep:flume", "dep:tokio", "tokio/rt-multi-thread"]
sqlx = ["dep:tracing", "dep:tracing-subscriber"]
diesel = ["dep:diesel"]
threads = []
dev = ["dep:time"]
hotpath-cpu = ["hotpath-macros/hotpath-cpu", "dep:object", "dep:rustc-demangle", "dep:flate2", "dep:serde", "dep:serde_json"]
hotpath-mcp = ["hotpath", "dep:rmcp", "dep:tokio", "tokio/rt", "tokio/net", "dep:axum", "dep:tokio-util", "dep:schemars"]

[dependencies]
arc-swap = { version = "1.7", optional = true }
cfg-if = { version = "1.0", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
crossbeam-channel = { version = "0.5", optional = true }
flume = { version = "0.12.0", optional = true }
parking_lot = { version = "0.12", optional = true }
async-lock = { version = "3", optional = true }
crossterm = { version = "0.29", optional = true }
eyre = { version = "0.6", optional = true }
hdrhistogram = { version = "7", default-features = false, optional = true }
hotpath-macros = { workspace = true }
prettytable-rs = { version = "0.10", default-features = false, optional = true }
quanta = { version = "0.12", optional = true }
ratatui = { version = "0.30", optional = true }
regex = { version = "1", optional = true }
serde = { version = "1.0.130", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
tiny_http = { version = "0.12", optional = true }
tokio = { version = "1.47", features = ["rt"], optional = true }
ureq = { version = "3", features = ["json"], optional = true }
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"], optional = true }
futures-channel = { version = "0.3", features = ["sink"], optional = true }
async-channel = { version = "2", optional = true }
futures-util = { version = "0.3", features = ["sink"], optional = true }
pin-project-lite = { version = "0.2.12", optional = true }
libc = { version = "0.2.172", optional = true }
time = { version = "0.3", features = ["formatting", "local-offset", "macros"], optional = true }
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", default-features = false, features = ["registry"], optional = true }
sqlx = { version = "0.9", default-features = false, features = ["sqlite", "runtime-tokio"], optional = true }
diesel = { version = "2.3", default-features = false, optional = true }
libsqlite3-sys = { version = "0.30", features = ["bundled"], optional = true }
rmcp = { version = "1.4", features = ["server", "transport-streamable-http-server", "transport-streamable-http-server-session"], optional = true }
schemars = { version = "1", optional = true }
axum = { version = "0.8", optional = true }
tokio-util = { version = "0.7", optional = true }
hotpath-meta = { workspace = true, optional = true }
object = { version = "0.36", default-features = false, features = ["read", "std"], optional = true }
rustc-demangle = { version = "0.1.24", optional = true }
flate2 = { version = "1", optional = true }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }

[package.metadata.docs.rs]
features = ["hotpath", "hotpath-alloc"]

[dev-dependencies]
serde_json = "1.0"
ureq = { version = "3", features = ["json"] }
