iqdb-types 1.0.0

Foundational vector-database types for the iQDB family - the shared vocabulary every iQDB crate speaks.
Documentation
  • Vector / VectorRef — owned (validated, Box<[f32]>-backed) and borrowed N-dimensional float vectors
  • VectorId — stable identifier: 64-bit integer or user-supplied bytes
  • DistanceMetric — metric tag: Cosine, DotProduct, Euclidean, Manhattan, Hamming
  • Metadata / Value — immutable, ordered scalar key/value payload
  • Filter — boolean expression tree over metadata (closed-world semantics)
  • SearchParams — query parameters: k, metric, filter, search-time breadth
  • Hit — a search result: id, distance, and optional metadata
  • IqdbError — the domain error (error-forge ForgeError)
  • serde support — every public type (de)serializes under the serde feature

Installation

[dependencies]
iqdb-types = "1.0"

Status

v1.0.0stable. The public API is committed under SemVer for the 1.x series (no breaking changes until 2.0; the frozen surface is recorded in the ROADMAP). It is property-tested across every invariant, fully documented with runnable examples and a complete API reference, performance-tuned (Box<[f32]>-backed Vector, inlined accessors, a benchmarked hot path), validated by a consumer-simulation suite mirroring the real downstream crates, and verified on Windows + Linux across stable and the 1.87 MSRV.

Where It Fits

iqdb-types is the root of the iQDB dependency graph. Everything builds on it:

  • iqdb-distance — operates on these Vector and DistanceMetric types
  • iqdb-flat / iqdb-hnsw / iqdb-ivf — index crates returning Hits for SearchParams
  • iqdb — the database, composing the family on this shared vocabulary

It has no first-party dependencies, so it is unblocked and buildable today.

Contributing

See dev/DIRECTIVES.md for engineering standards and the definition of done. Before a PR: cargo fmt --all, cargo clippy --all-targets --all-features -- -D warnings, and cargo test --all-features must be clean.