Run SQLite files and Postgres syntax in a single embedded database
Open existing SQLite database files to run SQL queries and connect Postgres clients if needed. Written in Rust, this database runs inside a process and is already used in production services by multiple organizations. Designed with a single engine that handles both SQLite and Postgres SQL syntax, it allows applications to manage a single core when they require diverse database interfaces.
A database engine that works like LLVM
This project applies the concept of LLVM from the compiler world to databases. It compiles SQL queries into bytecode and executes them on a virtual machine called VDBE. If SQLite is the first frontend for this virtual machine, Postgres is the experimental second frontend. The two dialects share the storage, concurrency control, query compiler, and virtual machine, differing only in SQL syntax. This design allows new database interfaces to be added on top of a single stable core.
Supported features and experimental elements
It follows the SQL syntax, file format, and C API compatibility of SQLite version 3.50.4.
- Postgres compatibility An experimental frontend that supports Postgres SQL syntax and wire protocol.
- Data encryption Experimental at-rest encryption is provided to protect local data.
- Incremental computation Performs incremental computation for view maintenance and query subscriptions using DBSP.
- Full-text search Experimentally supports full-text search (FTS) based on the tantivy library.
Direct connection with AI assistants
AI assistants can interact with the database through the MCP (Model Context Protocol) server built into the CLI. Starting the server with the tursodb your_database.db --mcp command allows AI to use nine tools, including listing tables, describing schemas, executing read-only queries, inserting and modifying data, and changing schemas. By adding configuration files to major AI development environments like Claude Code, Claude Desktop, and Cursor, you can manage the database using natural language commands.
Things to check before adoption
This project is not yet at version 1.0, and some features are explicitly marked as experimental. While it aims for SQLite-level stability, maintaining independent backups is recommended. 100% compatibility with SQLite is a mandatory requirement for version 1.0, and currently, some differences exist as documented in the COMPAT.md file. The Postgres frontend is an additional feature and introduces no changes for existing SQLite users. The license is MIT, and it is rapidly developing new features such as asynchronous support and vector search within the Rust ecosystem.