[package]
name = "hermes-core"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
authors.workspace = true
keywords.workspace = true
categories.workspace = true
description = "Core async search engine library with WASM support"

[dependencies]
tokio = { workspace = true, optional = true }
async-trait = { workspace = true }
futures = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
byteorder = { workspace = true }
zstd = { workspace = true }
rustc-hash = { workspace = true }
smallvec = { workspace = true }
parking_lot = { workspace = true }
crossbeam-channel = { workspace = true, optional = true }
num_cpus = { workspace = true, optional = true }
rayon = { workspace = true, optional = true }
thiserror = { workspace = true }
log = "0.4"
rust-stemmers = { workspace = true }
stop-words = { workspace = true }
pest = { workspace = true }
pest_derive = { workspace = true }
base64 = { workspace = true }
regex = { workspace = true }
rand = { workspace = true }
reqwest = { version = "0.12", default-features = false, optional = true }
instant = { version = "0.1", features = ["wasm-bindgen"], optional = true }
bumpalo = { workspace = true, optional = true }
lasso = { workspace = true, optional = true }
hashbrown = { workspace = true }
memmap2 = { workspace = true, optional = true }
uuid = { workspace = true, optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["macros", "test-util"] }
tempfile = { workspace = true }
rand = { workspace = true }
criterion = { workspace = true }
comfy-table = "7"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true }

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

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

[[bench]]
name = "posting_compression"
path = "benches/posting_compression/main.rs"
harness = false

[features]
default = ["native"]
native = ["dep:tokio", "dep:crossbeam-channel", "dep:num_cpus", "dep:rayon", "dep:bumpalo", "dep:lasso", "dep:memmap2", "dep:uuid"]
wasm = []
http = ["dep:reqwest", "dep:instant"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.reqwest]
version = "0.12"
default-features = false
features = ["rustls-tls"]
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.reqwest]
version = "0.12"
default-features = false
optional = true
