mirror of
https://github.com/qdrant/qdrant.git
synced 2026-09-21 13:37:46 -05:00
`cargo audit` flags rand 0.7.3 as unsound (RUSTSEC-2026-0097), and permutation_iterator 0.1.2 is its sole importer. The crate is unmaintained, so the finding is permanent for as long as we depend on it. Everything we used it for is "pick k distinct random indices out of n", which is exactly `rand::seq::index::sample` from the workspace rand. Switch the three src call sites and the two benches over, and drop the dependency. 11 crates leave Cargo.lock. Also fix a comment in quantile.rs claiming the permutation was deterministic per count: the old crate keyed itself from thread_rng on every call, so it never was. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
70 lines
1.3 KiB
TOML
70 lines
1.3 KiB
TOML
[package]
|
|
name = "quantization"
|
|
version = "0.1.0"
|
|
authors = [
|
|
"Andrey Vasnetsov <vasnetsov93@gmail.com>",
|
|
"Qdrant Team <info@qdrant.tech>",
|
|
]
|
|
license = "Apache-2.0"
|
|
edition = "2024"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
testing = ["common/testing"]
|
|
|
|
[build-dependencies]
|
|
cc = { workspace = true }
|
|
|
|
[dependencies]
|
|
fs-err = { workspace = true }
|
|
serde = { workspace = true }
|
|
rand = { workspace = true }
|
|
rayon = { workspace = true }
|
|
num-traits = { workspace = true }
|
|
common = { path = "../common/common" }
|
|
strum = { workspace = true }
|
|
bytemuck = { workspace = true }
|
|
parking_lot = { workspace = true }
|
|
ordered-float = { workspace = true }
|
|
arrayvec = "0.7.6"
|
|
|
|
[dev-dependencies]
|
|
fs-err = { workspace = true, features = ["debug"] }
|
|
quantization = { path = ".", features = ["testing"] }
|
|
criterion = { workspace = true }
|
|
num_threads = "0.1.7"
|
|
rand_distr = { workspace = true }
|
|
rstest = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
|
|
[[bench]]
|
|
name = "encode"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "pq"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "binary"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "p_square"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "hadamard"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "turboquant"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "turbo_simd"
|
|
harness = false
|