# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.92"
name = "hermes-core"
version = "1.4.44"
authors = ["izihawa"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Core async search engine library with WASM support"
homepage = "https://github.com/SpaceFrontiers/hermes"
documentation = "https://docs.rs/hermes-core"
readme = false
keywords = [
    "search",
    "full-text-search",
    "indexing",
    "ir",
]
categories = [
    "database",
    "text-processing",
]
license = "MIT"
repository = "https://github.com/SpaceFrontiers/hermes"
resolver = "2"

[features]
default = ["native"]
http = [
    "dep:reqwest",
    "dep:instant",
]
native = [
    "dep:tokio",
    "dep:crossbeam-channel",
    "dep:num_cpus",
    "dep:rayon",
    "dep:bumpalo",
    "dep:lasso",
    "dep:memmap2",
    "dep:uuid",
    "dep:bincode",
    "dep:kentro",
    "dep:ndarray",
    "dep:nalgebra",
    "dep:tokenizers",
    "dep:fst",
    "dep:hf-hub",
]
wasm = ["dep:tokenizers"]

[lib]
name = "hermes_core"
path = "src/lib.rs"

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

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

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

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

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

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

[dependencies.async-trait]
version = "0.1"

[dependencies.base64]
version = "0.22"

[dependencies.bincode]
version = "2.0"
optional = true

[dependencies.bumpalo]
version = "3.19"
optional = true

[dependencies.byteorder]
version = "1.5"

[dependencies.crossbeam-channel]
version = "0.5"
optional = true

[dependencies.fst]
version = "0.4"
optional = true

[dependencies.futures]
version = "0.3"

[dependencies.half]
version = "2.7"
features = ["std"]

[dependencies.hashbrown]
version = "0.15"

[dependencies.hf-hub]
version = "0.4"
features = [
    "ureq",
    "rustls-tls",
]
optional = true
default-features = false

[dependencies.instant]
version = "0.1"
features = ["wasm-bindgen"]
optional = true

[dependencies.kentro]
version = "0.2"
optional = true

[dependencies.lasso]
version = "0.7"
features = ["multi-threaded"]
optional = true

[dependencies.log]
version = "0.4"

[dependencies.memmap2]
version = "0.9"
optional = true

[dependencies.nalgebra]
version = "0.34"
optional = true

[dependencies.ndarray]
version = "0.16"
optional = true

[dependencies.num_cpus]
version = "1.17"
optional = true

[dependencies.parking_lot]
version = "0.12"

[dependencies.pest]
version = "2.8"

[dependencies.pest_derive]
version = "2.8"

[dependencies.rand]
version = "0.9"

[dependencies.rayon]
version = "1.11"
optional = true

[dependencies.regex]
version = "1.12"

[dependencies.reqwest]
version = "0.13"
optional = true
default-features = false

[dependencies.rust-stemmers]
version = "1.2"

[dependencies.rustc-hash]
version = "2.1"

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.smallvec]
version = "1.15"

[dependencies.stop-words]
version = "0.8"

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1.49"
features = [
    "rt-multi-thread",
    "sync",
    "fs",
    "io-util",
]
optional = true

[dependencies.uuid]
version = "1.19"
features = ["v4"]
optional = true

[dependencies.zstd]
version = "0.13"
features = ["zdict_builder"]
default-features = false

[dev-dependencies.comfy-table]
version = "7"

[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]

[dev-dependencies.rand]
version = "0.9"

[dev-dependencies.tempfile]
version = "3.24"

[dev-dependencies.tokio]
version = "1.49"
features = [
    "rt-multi-thread",
    "sync",
    "fs",
    "io-util",
    "macros",
    "test-util",
]

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

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokenizers]
version = "0.22"
features = [
    "onig",
    "http",
]
optional = true
default-features = false

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.49"
features = [
    "rt-multi-thread",
    "sync",
    "fs",
    "io-util",
]

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

[target.'cfg(target_arch = "wasm32")'.dependencies.tokenizers]
version = "0.22"
features = ["fancy-regex"]
optional = true
default-features = false
