There isn’t currently a well‐known, drop‐in “sqlite for vectors” written in Rust—that is, a fully embedded, serverless vector database that you can simply drop into your application like SQLite. However, there are a few paths you might consider:
1. Build Your Own Using Existing Rust Components
While no single crate currently offers a complete serverless vector database, you can assemble one by combining a couple of existing libraries:
-
Embedded Storage:
Use an embedded key/value store such as Sled or RocksDB Rust binding to persist your data. These libraries provide SQLite‑like embedded storage without requiring a separate server.
-
Vector Indexing/Similarity Search:
For vector operations (like approximate nearest neighbor search), there are a few crates you might explore:
- hnsw – Implements Hierarchical Navigable Small World graphs for approximate nearest neighbor search.
- annoy-rs – A Rust port of Spotify’s Annoy (Approximate Nearest Neighbors Oh Yeah) library.
- scann (if and when a Rust binding becomes available) – Although originally in C++, bindings or FFI integrations might be possible.
By combining an embedded storage engine with one of these vector search libraries, you can create a custom solution that meets your needs.
2. Watch the Ecosystem for New Projects
The Rust ecosystem is vibrant and evolving. New projects emerge frequently. It’s possible that in the near future someone will release an all-in-one, SQLite‑like vector database in Rust. Keeping an eye on Rust community channels (forums, GitHub, or the Rust subreddit) can help you stay on top of new developments.
3. Alternative Approaches
If a fully embedded solution isn’t a strict requirement, you might also consider:
-
Server-Based Vector Databases:
There are projects like Qdrant or Milvus that are purpose‑built for vector search. They aren’t embedded like SQLite (they’re typically deployed as standalone services), but they offer rich feature sets for managing vector data.
-
Extending Existing Embedded Databases:
Some projects are experimenting with adding vector search capabilities to traditional databases (for example, PostgreSQL’s pgvector extension). While this isn’t exactly “SQLite in Rust,” it shows the growing interest in integrating vector search into well‑known database systems.
Conclusion
To summarize, there isn’t an off‑the‑shelf, SQLite‑like serverless vector database in Rust at the moment. Your best bet if you need an embedded solution is to build on top of components like Sled (for storage) and one of the available Rust libraries for approximate nearest neighbor search. This approach gives you the flexibility to tailor the solution to your specific requirements while leveraging the performance and safety guarantees of Rust.
If you decide to embark on this path or if you spot or create such a project, it would certainly become a valuable asset in the Rust ecosystem. Let me know if you need help integrating any of these components or further guidance on building your custom solution!