[package]
edition = "2021"
rust-version = "1.80"
name = "vicinity"
version = "0.1.5"
authors = ["Arc <attobop@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Approximate Nearest Neighbor Search: HNSW, DiskANN, IVF-PQ, ScaNN, quantization"
documentation = "https://docs.rs/vicinity"
readme = "README.md"
keywords = [
"ann",
"hnsw",
"vector-search",
"similarity",
"nearest-neighbor",
]
categories = [
"algorithms",
"science",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/arclabs561/vicinity"
[features]
balltree = []
benchmark = []
default = [
"hnsw",
"innr",
]
diskann = ["dep:serde_json"]
evoc = ["dep:clump"]
hnsw = []
id-compression = [
"dep:cnk",
"dep:sbits",
"cnk/sbits",
]
innr = ["dep:innr"]
ivf_pq = [
"dep:clump",
"dep:serde",
"dep:serde_json",
"smallvec/serde",
]
kdtree = []
kmeans_tree = []
memmap = ["persistence"]
nightly = []
nsw = []
parallel = ["dep:rayon"]
persistence = [
"dep:serde",
"dep:serde_json",
"smallvec/serde",
"dep:postcard",
"dep:bytemuck",
"dep:memmap2",
"dep:durability",
"dep:byteorder",
"dep:crc32fast",
"dep:libc",
"dep:hex",
"dep:fst",
]
persistence-bincode = [
"dep:bincode",
"persistence",
]
python = [
"dep:pyo3",
"dep:numpy",
"hnsw",
]
qntz = ["dep:qntz"]
quantization = ["qntz"]
rabitq = [
"qntz",
"qntz/rabitq",
]
rmt-spectral = ["dep:rmt"]
rptree = []
saq = [
"qntz",
"qntz/ternary",
]
scann = ["dep:clump"]
serde = [
"dep:serde",
"dep:serde_json",
"smallvec/serde",
]
simsimd = ["dep:simsimd"]
sng = []
vamana = ["hnsw"]
[lib]
name = "vicinity"
crate-type = ["rlib"]
path = "src/lib.rs"
[[example]]
name = "01_basic_search"
path = "examples/01_basic_search.rs"
required-features = ["hnsw"]
[[example]]
name = "02_measure_recall"
path = "examples/02_measure_recall.rs"
required-features = ["hnsw"]
[[example]]
name = "03_quick_benchmark"
path = "examples/03_quick_benchmark.rs"
required-features = ["hnsw"]
[[example]]
name = "04_rigorous_benchmark"
path = "examples/04_rigorous_benchmark.rs"
required-features = ["hnsw"]
[[example]]
name = "05_normalization_matters"
path = "examples/05_normalization_matters.rs"
required-features = ["hnsw"]
[[example]]
name = "ann_benchmark"
path = "examples/ann_benchmark.rs"
required-features = ["hnsw"]
[[example]]
name = "dual_branch_demo"
path = "examples/dual_branch_demo.rs"
required-features = ["hnsw"]
[[example]]
name = "dual_branch_hnsw_demo"
path = "examples/dual_branch_hnsw_demo.rs"
required-features = ["hnsw"]
[[example]]
name = "evoc_demo"
path = "examples/evoc_demo.rs"
required-features = ["evoc"]
[[example]]
name = "glove_benchmark"
path = "examples/glove_benchmark.rs"
required-features = ["hnsw"]
[[example]]
name = "hnsw_benchmark"
path = "examples/hnsw_benchmark.rs"
required-features = ["hnsw"]
[[example]]
name = "ivf_pq_demo"
path = "examples/ivf_pq_demo.rs"
required-features = ["ivf_pq"]
[[example]]
name = "lid_demo"
path = "examples/lid_demo.rs"
required-features = ["hnsw"]
[[example]]
name = "lid_outlier_detection"
path = "examples/lid_outlier_detection.rs"
required-features = ["hnsw"]
[[example]]
name = "rabitq_demo"
path = "examples/rabitq_demo.rs"
required-features = [
"rabitq",
"hnsw",
"quantization",
]
[[example]]
name = "retrieve_and_rerank"
path = "examples/retrieve_and_rerank.rs"
required-features = ["hnsw"]
[[example]]
name = "semantic_search_demo"
path = "examples/semantic_search_demo.rs"
required-features = ["hnsw"]
[[example]]
name = "sift_benchmark"
path = "examples/sift_benchmark.rs"
required-features = ["hnsw"]
[[test]]
name = "chaos_persistence"
path = "tests/chaos_persistence.rs"
[[test]]
name = "cross_algorithm_consistency"
path = "tests/cross_algorithm_consistency.rs"
[[test]]
name = "cross_crate_integration"
path = "tests/cross_crate_integration.rs"
[[test]]
name = "diskann_persistence_test"
path = "tests/diskann_persistence_test.rs"
[[test]]
name = "distributed_locking"
path = "tests/distributed_locking.rs"
[[test]]
name = "edge_cases"
path = "tests/edge_cases.rs"
[[test]]
name = "eval_e2e"
path = "tests/eval_e2e.rs"
[[test]]
name = "hnsw_e2e"
path = "tests/hnsw_e2e.rs"
[[test]]
name = "hnsw_integration_tests"
path = "tests/hnsw_integration_tests.rs"
[[test]]
name = "integration_idpaq"
path = "tests/integration_idpaq.rs"
[[test]]
name = "invariants"
path = "tests/invariants.rs"
[[test]]
name = "property_tests"
path = "tests/property_tests.rs"
[[test]]
name = "regression_known_bugs"
path = "tests/regression_known_bugs.rs"
[[bench]]
name = "distance"
path = "benches/distance.rs"
harness = false
[[bench]]
name = "hnsw"
path = "benches/hnsw.rs"
harness = false
[[bench]]
name = "memory"
path = "benches/memory.rs"
harness = false
[[bench]]
name = "recall"
path = "benches/recall.rs"
harness = false
[[bench]]
name = "scaling"
path = "benches/scaling.rs"
harness = false
[dependencies.bincode]
version = "1.3"
optional = true
[dependencies.bytemuck]
version = "1.14"
features = ["derive"]
optional = true
[dependencies.byteorder]
version = "1.5"
optional = true
[dependencies.clump]
version = "0.5.2"
optional = true
[dependencies.cnk]
version = "0.1.3"
optional = true
[dependencies.crc32fast]
version = "1.4"
optional = true
[dependencies.durability]
version = "0.1.1"
optional = true
[dependencies.fst]
version = "0.4"
optional = true
[dependencies.hex]
version = "0.4"
optional = true
[dependencies.innr]
version = "0.2.0"
optional = true
[dependencies.libc]
version = "0.2"
optional = true
[dependencies.memmap2]
version = "0.9"
optional = true
[dependencies.numpy]
version = "0.27.0"
optional = true
[dependencies.postcard]
version = "1.0"
features = [
"use-crc",
"alloc",
"use-std",
]
optional = true
[dependencies.pyo3]
version = "0.27.2"
optional = true
[dependencies.qntz]
version = "0.1.1"
optional = true
package = "qntz"
[dependencies.rand]
version = "0.9"
[dependencies.rayon]
version = "1.10"
optional = true
[dependencies.rmt]
version = "0.1.2"
optional = true
[dependencies.sbits]
version = "0.1.1"
optional = true
[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "1.0"
optional = true
[dependencies.simsimd]
version = "6.5.12"
optional = true
[dependencies.smallvec]
version = "1.11"
[dependencies.thiserror]
version = "2.0"
[dev-dependencies.anyhow]
version = "1.0"
[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]
[dev-dependencies.memmap2]
version = "0.9"
[dev-dependencies.proptest]
version = "1.5"
[dev-dependencies.rankops]
version = "0.1.4"
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.tokio]
version = "1.40"
features = [
"macros",
"rt-multi-thread",
]
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.getrandom]
version = "0.3"
features = ["wasm_js"]
[lints.clippy]
doc_markdown = "allow"
empty_loop = "deny"
expect_used = "warn"
large_enum_variant = "warn"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
mutex_atomic = "warn"
never_loop = "warn"
too_many_arguments = "allow"
type_complexity = "allow"
unwrap_in_result = "warn"
unwrap_used = "warn"
wrong_self_convention = "allow"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.complexity]
level = "warn"
priority = -1
[lints.clippy.correctness]
level = "deny"
priority = -1
[lints.clippy.perf]
level = "warn"
priority = -1
[lints.clippy.restriction]
level = "allow"
priority = -1
[lints.clippy.style]
level = "warn"
priority = -1
[lints.clippy.suspicious]
level = "warn"
priority = -1
[lints.rust]
semicolon_in_expressions_from_macros = "warn"
unexpected_cfgs = "warn"
unsafe_op_in_unsafe_fn = "warn"
unstable_features = "deny"
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
variant_size_differences = "warn"
[lints.rust.future_incompatible]
level = "warn"
priority = -1
[lints.rust.nonstandard_style]
level = "warn"
priority = -1
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1
[lints.rust.rust_2021_compatibility]
level = "warn"
priority = -1