1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Copyright 2026 James Gober.
// Licensed under Apache-2.0 OR MIT.
//! # iqdb — embedded vector database for Rust
//!
//! `iqdb` is a single-process, in-application similarity-search engine
//! designed for high-dimensional workloads where every microsecond on
//! the query path matters. It targets the same operational shape as
//! [`sqlite`] or [`redb`]: no daemon, no network hop, no separate
//! runtime. Open a handle, write vectors, query nearest neighbours —
//! all from inside your binary.
//!
//! The `0.1.0` release is the **scaffolding milestone**. The crate
//! compiles, lints clean at the strict REPS profile, and passes the
//! full test matrix on Linux, macOS, and Windows. The public lifecycle
//! handle ([`Iqdb::open`], [`Iqdb::open_in_memory`], [`Iqdb::flush`],
//! [`Iqdb::close`]) and the [`Error`] / [`Result`] types are in place.
//! The query verbs ([`upsert`], [`search`], [`delete`]) land in
//! subsequent milestones — every stub returns [`Error::NotImplemented`]
//! until the engine is wired underneath it. The API is **unstable**
//! until 1.0.
//!
//! See the repository [`README`] and [`CHANGELOG`] for the
//! release-by-release surface and the milestone roadmap.
//!
//! [`sqlite`]: https://www.sqlite.org/
//! [`redb`]: https://crates.io/crates/redb
//! [`upsert`]: Iqdb
//! [`search`]: Iqdb
//! [`delete`]: Iqdb
//! [`README`]: https://github.com/jamesgober/iqdb/blob/main/README.md
//! [`CHANGELOG`]: https://github.com/jamesgober/iqdb/blob/main/CHANGELOG.md
//!
//! # Examples
//!
//! Open an ephemeral, in-memory instance and close it cleanly:
//!
//! ```
//! use iqdb::{Iqdb, Result};
//!
//! fn run() -> Result<()> {
//! let db = Iqdb::open_in_memory();
//! db.close()?;
//! Ok(())
//! }
//! # run().unwrap();
//! ```
//!
//! Match on the staged surface so call sites can be wired ahead of the
//! engine landing — the [`Error::NotImplemented`] branch disappears
//! once the corresponding milestone ships:
//!
//! ```
//! use iqdb::{Error, Iqdb, Result};
//!
//! fn flush_if_supported(db: &Iqdb) -> Result<()> {
//! match db.flush() {
//! Ok(()) => Ok(()),
//! Err(Error::NotImplemented) => Ok(()),
//! Err(err) => Err(err),
//! }
//! }
//!
//! let db = Iqdb::open_in_memory();
//! flush_if_supported(&db).unwrap();
//! ```
// Test code is allowed to use the convenience panickers — the strict
// lint profile above is for production library code, not assertion
// scaffolding inside `#[cfg(test)] mod tests` blocks.
pub use Iqdb;
pub use ;