iqdb-cache 1.0.0

In-process vector and result caching with LRU/LFU/ARC eviction - part of the iQDB family.
Documentation
# ██████╗ ███████╗██████╗ ███████╗
# ██╔══██╗██╔════╝██╔══██╗██╔════╝
# ██████╔╝█████╗  ██████╔╝███████╗
# ██╔══██╗██╔══╝  ██╔═══╝ ╚════██║
# ██║  ██║███████╗██║     ███████║
# ╚═╝  ╚═╝╚══════╝╚═╝     ╚══════╝
#╔═══════════════════════════════╗
#║ Rust Efficiency & Performance ║
#╚═══════════════════════════════╝
[package]
name    = "iqdb-cache"
version = "1.0.0"

# Minimum Supported Rust Version (MSRV)
rust-version = "1.87"
edition = "2024"

# License
license = "Apache-2.0 OR MIT"

# Readme
readme = "README.md"

# Description
description = "In-process vector and result caching with LRU/LFU/ARC eviction - part of the iQDB family."

# Keywords (5 max)
keywords = [
    "cache",
    "vector-database",
    "eviction",
    "lru",
    "iqdb"
]

# Categories
categories = [
    "caching",
    "data-structures"
]

# Links
homepage      = "https://github.com/jamesgober/iqdb-cache"
repository    = "https://github.com/jamesgober/iqdb-cache"
documentation = "https://docs.rs/iqdb-cache"

# Authors
authors = [
    "James Gober <me@jamesgober.com>",
    "Matt Callahan <matthewcallahan01@icloud.com>"
]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

# `loom` and `docsrs` are first-party build cfgs this crate sets deliberately
# (loom concurrency model-checking; docs.rs feature gating). Declare them so the
# `unexpected_cfgs` lint stays quiet under `#![deny(warnings)]`.
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)', 'cfg(docsrs)'] }

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


# FEATURE FLAGS
# #################################
[features]
# Default build: the cache wrapper over the std index traits, no optional
# dependencies. The crate is std-only — it builds on `iqdb-index`, which is.
default = []
# Derive `serde::{Serialize, Deserialize}` for `CacheStats`.
serde = ["dep:serde"]


# DEPENDENCIES
# #################################
[dependencies]
# The shared iQDB vocabulary: VectorId, Hit, SearchParams, DistanceMetric, Filter.
iqdb-types = "1.0.0"
# The trait this crate wraps: any `IndexCore` becomes a `CachedIndex`.
iqdb-index = "1.0.0"
# Monotonic, mockable time for result-cache TTL (the iQDB time standard).
clock-lib = "1.0.0"
# Optional: `CacheStats` serialization.
serde = { version = "1", optional = true, default-features = false, features = ["derive"] }


# DEV DEPENDENCIES
# #################################
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1"

# Loom is a real dependency under `--cfg loom` (the library swaps its `Mutex` and
# atomics for loom's instrumented types via `src/sync.rs`), not just a dev-dep.
# It is pulled only when concurrency model-checking; normal builds never see it.
[target.'cfg(loom)'.dependencies]
loom = "0.7"


# BENCHMARKS
# #################################
[[bench]]
name    = "cache_bench"
harness = false


# RELEASE PROFILE
# #################################
[profile.release]
opt-level     = 3
lto           = "fat"
codegen-units = 1
panic         = "abort"
strip         = "symbols"