[package]
authors = ["hatoo <hato2000@gmail.com>"]
categories = [
    "command-line-utilities",
    "network-programming",
    "web-programming::http-client",
    "development-tools::profiling",
]
description = "Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation."
edition = "2024"
keywords = ["cli", "load-testing", "performance", "http"]
license = "MIT"
name = "oha"
readme = "README.md"
repository = "https://github.com/hatoo/oha"
version = "1.12.0"
rust-version = "1.85"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["rustls"]
native-tls = ["dep:native-tls", "dep:tokio-native-tls"]
rustls = [
    "dep:rustls",
    "dep:tokio-rustls",
    "dep:rustls-native-certs",
    "dep:rustls-pki-types",
]
vsock = ["dep:tokio-vsock"]
http3 = ["dep:h3", "dep:h3-quinn", "dep:quinn-proto", "dep:quinn", "dep:http"]

[dependencies]
anyhow = "1.0.86"
average = "0.16.0"
byte-unit = "5.1.4"
clap = { version = "4.5.9", features = ["derive", "env"] }
float-ord = "0.3.2"
kanal = "0.1.1"
humantime = "2.1.0"
libc = "0.2.155"
serde = { version = "1.0.204", features = ["derive"] }
serde_json = "1.0"
thiserror = "2.0.12"
tokio = { version = "1.38.1", features = ["full"] }
ratatui = { version = "0.29.0", default-features = false, features = [
    "crossterm",
] }
aws-sign-v4 = "0.3"
chrono = "0.4"
bytes = "1"

hyper = { version = "1.4", features = ["client", "http1", "http2"] }

# native-tls
native-tls = { version = "0.2.12", features = ["alpn"], optional = true }
tokio-native-tls = { version = "0.3.1", optional = true }

rustls = { version = "0.23.18", optional = true }
rustls-native-certs = { version = "0.8.0", optional = true }
tokio-rustls = { version = "0.26.0", optional = true }
rustls-pki-types = { version = "1.7.0", optional = true }

h3 = { version = "0.0.8", optional = true }
h3-quinn = { version = "0.0.10", optional = true }
quinn-proto = { version = "0.11.10", optional = true, features = ["aws-lc-rs"] }
http = { version = "1.3.1", optional = true }
quinn = { version = "0.11.7", optional = true, features = [
    "aws-lc-rs",
    "runtime-tokio",
] }

base64 = "0.22.1"
rand = "0.9.1"
rand_core = "0.9.3"
hickory-resolver = { version = "0.25.2", features = ["tokio"] }
rand_regex = "0.18.0"
regex-syntax = "0.8.5"
url = "2.5.2"
http-body-util = "0.1.2"
hyper-util = { version = "0.1.6", features = ["tokio"] }
tokio-vsock = { version = "0.7.2", optional = true }
rusqlite = { version = "0.37.0", features = ["bundled"] }
num_cpus = "1.16.0"
tokio-util = "0.7.13"
clap-cargo = "0.18.3"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.6"

[target.'cfg(unix)'.dependencies]
rlimit = "0.10.1"

[dev-dependencies]
axum = { version = "0.8.1", features = ["http2"] }
axum-server = { version = "0.7.1", features = ["tls-rustls"] }
bytes = "1.6"
float-cmp = "0.10.0"
http-mitm-proxy = { version = "0.16.0", default-features = false }
jsonschema = "0.37.0"
lazy_static = "1.5.0"
predicates = "3.1.0"
# features = ["aws_lc_rs"] is a workaround for mac & native-tls
# https://github.com/sfackler/rust-native-tls/issues/225
rcgen = { version = "0.14.3", features = ["aws_lc_rs"] }
regex = "1.10.5"
tempfile = "3.10.1"
rustls = "0.23.18"
rstest = "0.26.0"
rstest_reuse = "0.7.0"
ctor = "0.6.1"

[target.'cfg(unix)'.dev-dependencies]
actix-web = "4"

[profile.pgo]
inherits = "release"
# https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Rust/faf/Cargo.toml + lto=true
opt-level = 3
panic = 'abort'
codegen-units = 1
lto = true
debug = false
incremental = false
overflow-checks = false

[profile.release-ci]
inherits = "pgo"
