About this project
dve (dve vector engine) is a library for creating and searching vector embeddings locally on Apple devices. It is built with Zig, and experimental Swift bindings are also available. The project describes itself as early-stage and actively developed, and welcomes bug reports, issues, and pull requests on GitHub.
Usage centers on opening a directory to store the vector database, selecting a model, and then embedding and searching text. In the Zig example, a directory is created with std.fs.cwd().makeOpenPath, a model is chosen via dve.VectorEngine(.mpnet_embedding), and the engine is initialized with an allocator and directory. Text entries are added with embedText, where the key identifies the entry (typically a file path). Search takes a query string and a result buffer, returning results ordered by similarity; the example shows a query about artificial intelligence matching the entry keyed "doc1". The README points to an examples directory for complete working demos in Zig and Swift, and to USAGE.md for installation, available model options and tradeoffs, and full usage details.
The stated motivation is that vector search is useful for apps, but on-device implementations are hard to find. Developers typically choose between cloud APIs, which add cost and a third-party dependency, or heavy all-in-one frameworks such as Hugging Face Transformers. The README argues this is especially acute on Apple platforms, where ML frameworks overwhelmingly prioritize Linux servers, CoreML is poorly documented, and cross-platform libraries rarely integrate cleanly into macOS or iOS apps. dve aims to fill that gap, starting with Apple while treating portability as a core design goal.
The project lists three core principles: portable, meaning it should use few libraries so it can be easily used on any platform; simple, meaning a simple but configurable interface with sane defaults; and local, meaning it should run performantly and never make network calls.
The roadmap includes adding Linux support, making Swift bindings more stable, making C/C++ bindings more stable, iOS support, multi-modal embedding support, downloading links within text documents and embedding them, support for multiple model types beyond mpnet and Apple NL, and support for multiple database instances within a single process.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.