[package]
name = "chromey"
version = "2.37.249"
rust-version = "1.70"
authors = ["j-mendez <jeff@spider.cloud>"]
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
homepage = "https://github.com/spider-rs/chromey"
repository = "https://github.com/spider-rs/chromey"
description = "Concurrent chrome devtools protocol automation library for Rust"
keywords = ["chrome", "cdp", "puppeteer", "automation","playwright"]
categories = ["web-programming", "api-bindings", "development-tools::testing"]

[lib]
name = "chromiumoxide"

[dependencies]
tokio-tungstenite = "0.28"
serde = { version = "1", features = ["derive"] }
futures = "0.3"
serde_json = { version = "1" }
which = { version = "8", optional = true }
thiserror = "1"
url = "2"
base64 = "0.22"
fnv = "1"
futures-timer = "3"
tokio = { version = "1", features = [
    "rt-multi-thread",
    "time",
    "fs",
    "macros",
    "process",
] }
tracing = "0.1"
pin-project-lite = "0.2"
dunce = "1"
reqwest = { version = "0.12", default-features = false, features = ["json"] }
lazy_static = "1"
phf = { version = "0.11", features = ["macros"] }
adblock = { version = "0.9", optional = true, default-features = false, features = [
    "embedded-domain-resolver",
    "full-regex-handling",
] }
rand = "0.9"
case_insensitive_string = { version = "0.2", features = ["compact", "serde"] }
hashbrown = { version = "0.15", default-features = true }
aho-corasick = "1"
sonic-rs = { version = "0.5", optional = true, features = ["utf8_lossy"] }
spider_network_blocker = "0"
spider_chromiumoxide_types = { path = "types", version = "0.7" }
spider_chromiumoxide_cdp = { path = "cdp", version = "0.7" }
spider_chromiumoxide_fetcher = { path = "fetcher", version = "0.7", default-features = false, optional = true }
http-cache-semantics = { version = "2", optional = true }
http-cache = { version = "0.20", optional = true, default-features = false }
http-cache-reqwest = { version = "0.15", optional = true, default-features = false }
http-global-cache = { version = "0.1.0", optional = true, default-features = false, features = ["cache_request"] }
lol_html = { version = "2", optional = true }
tokio-stream =  { version = "0.1", optional = true }
auto_encoder = { version = "0.1", optional = true }
serde_stacker = { version = "0.1", optional = true }
blake3 = { version = "1", optional = true }
hex = { version = "0.4", optional = true }
dashmap = { version = "6", optional = true }

[dependencies.spider_fingerprint]
version = "2"
default-features = false
features = ["serde", "headers", "std"]

[target.'cfg(windows)'.dependencies]
winreg = "0.52"

[dependencies.spider_firewall]
version = "2"
optional = true
default-features = false

[dev-dependencies]
quote = "1"
proc-macro2 = "1"
chrono = "0.4"
tracing-subscriber = "0.3"
tokio = { version = "1", features = ["rt-multi-thread", "time", "macros"] }
futures = "0.3"
anyhow = "1"

[features]
default = ["bytes", "simd", "default-tls", "serde0", "auto-detect-executable"]
collect_metrics = []
stream = ["tokio-tungstenite/stream"]
fetcher = []
bytes = []
adblock = ["dep:adblock"]
simd = ["dep:sonic-rs"]
firewall = ["dep:spider_firewall"]
firewall-default = ["firewall", "spider_firewall/default"]
firewall-rustls = ["firewall", "spider_firewall/rustls"]
chrome_tls_connection = ["tokio-tungstenite/native-tls"]
default-tls = ["reqwest/default-tls"]
rust-tls = ["reqwest/rustls-tls"]
serde0 = ["spider_chromiumoxide_cdp/serde0"]
auto-detect-executable = ["dep:which"]
dynamic-versions = ["spider_fingerprint/dynamic-versions"]
_cache = [
    "dep:http-global-cache", 
    "dep:http-cache", 
    "dep:http-cache-semantics", 
    "dep:lol_html", 
    "dep:tokio-stream", 
    "dep:http-cache-reqwest", 
    "dep:auto_encoder",
    "dep:blake3",
    "dep:hex",
    "dep:dashmap"
    ]
cache = ["_cache", "http-global-cache/cache"]
cache_mem = ["_cache", "http-global-cache/cache_mem"]
serde_stacker = ["dep:serde_stacker", "serde_json/unbounded_depth"]

# Temporary features until cargo weak dependencies bug is fixed
# See https://github.com/rust-lang/cargo/issues/10801
_fetcher-rusttls-tokio = [
    "fetcher",
    "spider_chromiumoxide_fetcher/_rustls-tokio",
]
_fetcher-native-tokio = [
    "fetcher",
    "spider_chromiumoxide_fetcher/_native-tokio",
]

[[example]]
name = "wiki-tokio"

[[example]]
name = "iframe-workaround"

[[example]]
name = "storage-cookie"

[[example]]
name = "console-logs"

[[example]]
name = "httpfuture"

[[example]]
name = "connect"

[[example]]
name = "http_cache"
required-features = ["cache"]

[[example]]
name = "bytes-control"

[[example]]
name = "fetcher-tokio"
required-features = ["_fetcher-native-tokio"]
