[package]
name = "hpx-browser"
description = "Headless browser engine for hpx: HTML parsing, rendering, CDP, and canvas support"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true

[features]
blocker = []
canvas = [
    "dep:skia-safe",
    "dep:png",
    "dep:image",
    "dep:fontdb",
    "dep:rustybuzz",
    "dep:swash",
    "dep:rustfft",
]
cdp = ["dep:hpx-yawc", "dep:hyper", "dep:hyper-util", "hpx-yawc/axum"]
proptest = ["dep:proptest"]
v8 = ["dep:deno_core"]
workers = ["v8"]

[dependencies]
# always-on
async-trait = { workspace = true }
base64 = { workspace = true }
chrono = { workspace = true }
futures-util = { workspace = true }
hpx = { workspace = true }
html5ever = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
rand_distr = { workspace = true }
scc = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
taffy = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
url = { workspace = true }
winnow = { workspace = true }

# v8 feature
deno_core = { workspace = true, optional = true }

# canvas feature
fontdb = { workspace = true, optional = true }
image = { workspace = true, optional = true }
png = { workspace = true, optional = true }
rustfft = { workspace = true, optional = true }
rustybuzz = { workspace = true, optional = true }
skia-safe = { workspace = true, optional = true }
swash = { workspace = true, optional = true }

# cdp feature
hpx-yawc = { workspace = true, optional = true }
hyper = { workspace = true, features = ["server", "http1"], optional = true }
hyper-util = { workspace = true, features = [
    "tokio",
    "server-auto",
], optional = true }

# property testing
proptest = { workspace = true, optional = true }

[dev-dependencies]
criterion = { workspace = true, features = ["html_reports"] }

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

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

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

[lints]
workspace = true
