[package]
name = "sourmash"
version = "0.22.0"
authors = ["Luiz Irber <luiz@sourmash.bio>", "N. Tessa Pierce-Ward <tessa@sourmash.bio>", "C. Titus Brown <titus@idyll.org>"]
description = "tools for comparing biological sequences with k-mer sketches"
repository = "https://github.com/sourmash-bio/sourmash"
keywords = ["minhash", "bioinformatics"]
categories = ["science", "algorithms", "data-structures"]
license = "BSD-3-Clause"
edition = "2021"
readme = "README.md"
autoexamples = false
autobins = false
rust-version = "1.74.0"

[lib]
name = "sourmash"
crate-type = ["lib", "staticlib", "cdylib"]
bench = false

[features]
parallel = ["dep:rayon"]
maturin = []
branchwater = ["dep:rocksdb", "parallel"]
rkyv = ["dep:rkyv"]
default = []

[dependencies]
az = "1.0.0"
byteorder = "1.4.3"
camino = { version = "1.2.2", features = ["serde1"] }
cfg-if = "1.0"
counter = "0.6.0"
csv = "1.4.0"
enum_dispatch = "0.3.13"
fixedbitset = "0.4.0"
getset = "0.1.6"
histogram = "0.11.4"
itertools = "0.14.0"
log = "0.4.29"
md5 = "0.8.0"
memmap2 = "0.9.9"
murmurhash3 = "0.0.5"
needletail = { version = "0.6.3", default-features = false }
niffler = { version = "3.0.0", default-features = false, features = [ "gz", "lzma", "zstd" ] }
# declare liblzma here to allow static compilation and fix macos linking issues in Python wheel
liblzma = { version = "0.3.6", features = ["static"] }
nohash-hasher = "0.2.0"
num-iter = "0.1.45"
once_cell = "1.18.0"
ouroboros = "0.18.5"
piz = "0.5.0"
primal-check = "0.3.4"
rayon = { version = "1.10.0", optional = true }
replace_with = "0.1.8"
rkyv = { version = "0.7.46", optional = true }
roaring = "0.11.0"
roots = "0.0.8"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
statrs = "0.18.0"
streaming-stats = "0.2.3"
thiserror = "2.0"
twox-hash = "1.6.0"
typed-builder = "0.20.0"
vec-collections = "0.4.3"

[dev-dependencies]
codspeed-criterion-compat = "2.7.2"
proptest = { version = "1.9.0", default-features = false, features = ["std"]}
rand = "0.9.2"
tempfile = "3.24.0"

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

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

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

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

[package.metadata.cargo-feature-combinations]
skip_optional_dependencies = true
denylist = ["maturin"]
skip_feature_sets = [
    ["branchwater", "parallel"], # branchwater implies parallel
]

## Wasm section. Crates only used for WASM, as well as specific configurations

[target.'cfg(all(target_arch = "wasm32", target_os="unknown"))'.dependencies]
js-sys = "0.3.72"
web-sys = { version = "0.3.72", features = ["console", "File", "FileReaderSync"] }
wasm-bindgen = "0.2.89"
getrandom = { version = "0.2", features = ["js"] }

[target.'cfg(all(target_arch = "wasm32"))'.dependencies]
chrono = { version = "0.4.32", features = ["wasmbind"] }

[target.'cfg(all(target_arch = "wasm32", target_os="unknown"))'.dev-dependencies]
wasm-bindgen-test = "0.3.42"

### These crates don't compile on wasm
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rocksdb]
version = "0.23.0"
optional = true
default-features = false
features = [ "bindgen-runtime", "snappy", "zstd" ]

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.7.0"
