Open-source project
tursodatabase/turso avatar
tursodatabase/turso

Turso Database: A SQLite-Compatible Core That Now Speaks Postgres

A SQL database in Rust: SQLite-compatible, now also speaking Postgres (experimental). The LLVM of databases.

24,287 stars1,346 forksRustMIT

At a glance

What is it?
Turso is an in-process SQL database in Rust that compiles SQL into bytecode for its own virtual machine, with SQLite and an experimental Postgres frontend. This review covers its architecture, setup, and the trade-offs of betting on a multi-dialect engine.
Who is it for?
Adopt Turso if you need an in-process, SQLite-compatible database with vector support, CDC, and a future path to Postgres compatibility, and you can tolerate pre-1.0 instability. Do not adopt it for production Postgres workloads yet, since that frontend is experimental and not feature-complete.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Turso Actually Is

Turso is a SQL database that runs inside your process, written in Rust. It is not a server you connect to over TCP by default. The README calls it an in-process SQL database, compatible with SQLite. That means you embed it like you would SQLite, but you get a Rust-native implementation with modern extras. The project also claims to run in production at multiple organizations, though the README does not name them. The core idea is that SQL is compiled into bytecode for a virtual machine called VDBE, similar to how SQLite works internally. That bytecode design is what lets Turso support more than one SQL dialect. SQLite is the primary frontend, and Postgres is a second, experimental frontend. The stated goal is to be for databases what LLVM is to compilers: one core, many frontends. That is an ambitious claim, and the README even says the core is general enough to run Doom, linking to a separate example repository. The target audience is developers who want SQLite compatibility with a more modern codebase, or who want to move between SQLite and Postgres dialects without changing storage engines.

The VDBE Architecture and Why It Matters

The mechanism is a virtual machine. Turso compiles SQL into bytecode for the VDBE, then executes that bytecode. This is not a novel idea; SQLite does the same. But Turso takes it further by making the VM the stable interface between frontends and the storage core. The SQLite frontend parses SQLite syntax and produces VDBE bytecode. The Postgres frontend parses Postgres syntax and produces the same bytecode. That means the storage engine, transaction manager, and index structures are shared. The practical consequence is that you could write data through the SQLite interface and read it through the Postgres interface, if the Postgres frontend is mature enough. The README lists Postgres compatibility as experimental, with a separate compatibility reference document. The VDBE design also enables features like BEGIN CONCURRENT for better write throughput using MVCC, and CDC for real-time change tracking. The VM is the reason Turso can claim to be the LLVM of databases. It is a bold architectural bet, and it is the main reason to consider Turso over a plain SQLite fork.

Getting Turso Running: CLI, Rust, and Other Bindings

The fastest way to try Turso is the command-line installer. The README gives a curl command that pipes a shell script from the GitHub releases page. After installation, you run tursodb to start an interactive shell. The shell connects to a transient in-memory database by default, and you can use .open FILENAME to persist. The README shows a simple session: create a table, insert rows, and select them, with output formatted as pipe-separated values. You can also build from source with cargo run, or use Docker with make docker-cli-build and make docker-cli-run. For Rust, you add the turso crate with cargo add turso, then use Builder::new_local("sqlite.db").build().await to open a database. The JavaScript binding is @tursodatabase/database on npm, and the Python binding is pyturso on PyPI. Go uses a driver registered as "turso" with database/sql. There are also .NET and Java bindings. The README shows a .NET example with TursoConnection, but the Java example is truncated. The breadth of bindings is a strong point, but the README does not document the Postgres frontend setup in any of these examples. To use Postgres, you would need to dig into the postgres/COMPAT.md file, which is not included in the cleaned README.

Experimental Features: What Works and What Is Risky

Turso ships several experimental features that are not production-ready. Postgres compatibility is the headline, but it is explicitly experimental. The README says it covers SQL dialect and wire protocol, with a compatibility reference, but no details on what is missing. Encryption at rest is also experimental, protecting data locally. Incremental computation using DBSP for view maintenance and query subscriptions is experimental; that is a complex feature that likely requires careful tuning. Full-text search is experimental and powered by tantivy, which is a mature Rust library, but the integration is new. Multi-process WAL coordination via a .tshm sidecar is experimental, meaning you can have multiple processes reading and writing the same database file, but that is a hard problem and likely has edge cases. The roadmap includes vector indexing for approximate search, which is not yet available. The takeaway is that Turso's core SQLite compatibility is the stable part, while everything that differentiates it from SQLite is experimental. If you need Postgres compatibility or encryption in production today, you are an early adopter and should expect breaking changes.

SQLite Compatibility: The Foundation and Its Limits

The README states SQLite compatibility for SQL dialect, file formats, and the C API, tracking SQLite version 3.50.4. That is a specific version, and the COMPAT.md document presumably lists deviations. The fact that they track a specific version means you cannot assume every SQLite feature works. For example, SQLite has a long tail of pragmas, extensions, and obscure SQL functions. Turso might not implement all of them. The README mentions extended ALTER support and faster schema changes, which suggests they have improved on SQLite in some areas. But compatibility is a moving target: SQLite itself releases updates, and Turso must keep up. The C API compatibility is important if you have existing C code that links against SQLite. The README claims compatibility, but the details are in COMPAT.md, which is not in the cleaned material. You should verify your specific SQL constructs against that document before relying on Turso as a drop-in SQLite replacement.

The Postgres Frontend: A Different Approach to Compatibility

The Postgres frontend is the most interesting and the most risky part of Turso. Instead of translating Postgres SQL to SQLite semantics, Turso compiles Postgres syntax directly to VDBE bytecode. That is a fundamentally different approach from projects like CockroachDB or YugabyteDB, which implement Postgres wire compatibility by reimplementing the Postgres query layer on a distributed storage engine. Turso's approach means the Postgres frontend must handle the entire Postgres type system, functions, and protocol quirks on top of the VDBE. The README says it is experimental, and the compatibility reference is in postgres/COMPAT.md. The practical implication is that you cannot point a Postgres client at Turso and expect everything to work. You will likely hit unsupported features, especially around advanced SQL like window functions, JSONB operators, or procedural languages. The wire protocol compatibility is a separate concern: even if the SQL dialect is supported, the protocol details like prepared statement handling, error codes, and authentication may differ. If you need Postgres compatibility for a real project, you should test your specific queries and drivers against Turso before committing.

Alternatives: SQLite, libSQL, and Postgres Itself

The most direct alternative is SQLite itself. If you only need SQLite compatibility, you can use SQLite and get decades of maturity, a stable C API, and ubiquitous support. Turso is a Rust reimplementation, which may be faster or safer, but it is not a drop-in replacement until compatibility is proven. Another alternative is libSQL, which is mentioned in the README as the source of vector search features. libSQL is a fork of SQLite that adds extensions, and Turso is a separate project that shares some ideas but is not a fork. If you need Postgres compatibility, the alternative is to run an actual Postgres server. Postgres is a mature, feature-complete database with a huge ecosystem. Turso's Postgres frontend is experimental, so if you need production Postgres, you should use the real thing. The difference in approach is that Turso aims to unify multiple dialects on one core, while the alternatives are single-dialect. That unification is attractive if you want to migrate between SQLite and Postgres without changing your storage layer, but it is a long-term bet.

Maintenance, Upgrade Cost, and License

The project is under active development, with releases every few days in the 0.8.0-pre series. That means you should expect breaking changes between pre-releases. The README does not document a migration path or upgrade policy. The license is MIT, which is permissive and allows commercial use without copyleft obligations, but you are responsible for verifying the license implications for your own use. The maintenance cost is high if you track the latest pre-releases, because each one may change APIs or behavior. The Rust crate and the language bindings are likely to evolve in lockstep. If you adopt Turso, you should pin a specific version and plan to invest time in upgrades. The project has a manual in docs/manual.md, which is the authoritative source for configuration and usage. The README does not mention any data migration tooling from SQLite or Postgres, so you will need to handle that yourself. The active release cadence is a sign of momentum, but it also means the project is not yet stable enough for risk-averse teams.

Editorial conclusion

Adopt Turso if you need an in-process, SQLite-compatible database with vector support, CDC, and a future path to Postgres compatibility, and you can tolerate pre-1.0 instability. Do not adopt it for production Postgres workloads yet, since that frontend is experimental and not feature-complete. Before committing, verify that the SQLite compatibility level (tracking 3.50.4) covers your specific SQL constructs, and test the Postgres wire protocol against your actual client drivers. The project is moving fast with pre-releases every few days, so pin a specific version and review the changelog.

Official sources

  1. Official README
  2. Project repository
  3. Release notes
Community notes

Community notes