Skip to content
TaiDB logo

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.

TaiDB database logo used across the repository and documentation

  • 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.

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.

  • 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.
  1. Start with the Rust crate if your application is Rust-native.
  2. Use the CLI when you need scripting, automation, or quick experiments.
  3. Use the CLI bridge examples when you want simple integration from another language today.
  4. Use native FFI only when you are ready to manage platform-specific builds.
Terminal window
cargo add taidb

Or install the command line tool:

Terminal window
cargo install taidb
  • 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.