
TaiDB
A compact embeddable Rust key-value and vector database for local-first AI applications.
TaiDB is a compact embeddable database written in Rust. It is designed for applications that need local key-value storage, exact vector search, zstd compression, and authenticated encryption without running a separate server.
TaiDB is early, but it already provides a practical crate and CLI for local AI-native application workloads such as embedding caches, document indexes, desktop apps, developer tools, and small local services.
What TaiDB is good for
Section titled “What TaiDB is good for”- Local-first apps that should keep data on the user’s machine.
- AI tools that need to store text, metadata, and embedding vectors together.
- Rust applications that want a small embedded dependency instead of a service.
- CLI workflows that need a single database file and simple commands.
- Experiments where exact vector search is more important than approximate index complexity.
What TaiDB is not
Section titled “What TaiDB is not”TaiDB is not a SQL engine, a distributed database, a multi-writer server, or a drop-in replacement for every SQLite, RocksDB, or LevelDB workload. The project should earn performance claims with repeatable benchmarks before making broad comparisons.
Current capabilities
Section titled “Current capabilities”- Append-only log storage.
- In-memory key index rebuilt on open.
- Memory-mapped reads by default.
- Optional zstd compression.
- Optional XChaCha20-Poly1305 authenticated encryption.
- Exact cosine vector search.
- CLI commands for common data, vector, import, verify, compact, and benchmark workflows.
- Rust API for embedded use.
- Native FFI examples for C, Python, Go, and TypeScript/Deno.
- CLI bridge examples for Node, Python, Go, Ruby, PHP, Bash, and Java.
- Compression benchmark reports for speed, ratio, and file-size tradeoffs.
Recommended path
Section titled “Recommended path”- Start with the Rust crate if your application is Rust-native.
- Use the CLI when you need scripting, automation, or quick experiments.
- Use the CLI bridge examples when you want simple integration from another language today.
- Use native FFI only when you are ready to manage platform-specific builds.
Install
Section titled “Install”cargo add taidbOr install the command line tool:
cargo install taidbNext steps
Section titled “Next steps”- Read the Rust quick start.
- Try the CLI quick start.
- Review the storage model before depending on format stability.
- Read the roadmap before using TaiDB for production data.