Skip to content

Turso

An in-process SQL database in Rust that aims for SQLite compatibility, with Postgres support in progress.

Stars
25.1k
Forks
1.5k
Licence
MIT
Language
Rust
Last update
4 days ago
Type
Library

What it is

Turso is a database engine written in Rust that runs inside your application rather than as a separate server, and it is designed to read and write SQLite-compatible files. It also has an experimental Postgres frontend, so the same core can accept Postgres-style SQL. The project describes its goal as one shared core with several SQL dialects on top, similar in spirit to how LLVM serves many compilers.

  • Embed a local SQL database in a Rust application using the crate named turso
  • Run the interactive turso shell to create tables and query data from the command line
  • Use the JavaScript, Python, or Go bindings to open an existing SQLite-style file like sqlite.db
  • Experiment with change data capture to track database changes in real time

Great for

  • Developers who want an embedded SQLite-compatible database in a Rust, JavaScript, Python, Java, Go, or .NET project
  • Teams exploring a Rust-based alternative to SQLite that wants features like concurrent writes via MVCC
  • Developers who want to run a database in the browser through WebAssembly
  • Projects that want a local-first database with change data capture

Not ideal for

  • Teams that need a production-proven database today: the README marks Postgres compatibility, encryption, and several other features as experimental
  • Anyone needing vector indexing for fast approximate search, since the README lists it only on the roadmap
  • Users who need the mature, long-established SQLite ecosystem and its guarantees, since this project is still heading toward 1.0
Step-by-step guide: how to use TursoInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Rust toolchain (for cargo add turso or cargo run) · Node.js (for npm package) · Python with uv (for pyturso), optional

    Install the turso CLI

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tursodatabase/turso/releases/latest/download/turso_cli-installer.sh | sh

    Add the Rust crate

    cargo add turso

    Install the JavaScript package

    npm i @tursodatabase/database

    Install the Python package

    uv pip install pyturso
  2. 2

    Run it

    • Install the CLI with the curl command in the README, or add the turso crate to a Rust project.
    • Run tursodb to launch the interactive shell.
    • Create a table with CREATE TABLE users (id INT, username TEXT); and insert a row.
    • Run SELECT * FROM users; to see the results.
    • Use .open FILENAME to switch from the transient in-memory database to a persistent file.
  3. 3

    Get the most out of it

    • Use the language bindings in the README (Go, JavaScript, Java, .NET, Python, Rust) to match your existing stack
    • Read COMPAT.md to check which SQLite features are supported before relying on them
    • Try BEGIN CONCURRENT for write-heavy workloads, since the README links it to MVCC
    • Use the MCP server mode in the CLI if you want AI assistants to query the database
    • Build the WebAssembly target to run the database in browsers

Downloads

Strengths

  • Compatible with SQLite SQL dialect, file formats, and C API, tracking SQLite 3.50.4 according to the README
  • Offers language bindings for Go, JavaScript, Java, .NET, Python, Rust, and WebAssembly
  • Released under the permissive MIT license with an active repository and many stars

Trade-offs

  • Postgres compatibility, encryption at rest, full-text search, and multi-process WAL coordination are labelled experimental
  • The README says the project is still on its way to 1.0, so APIs and behavior may change
  • Vector indexing is only on the roadmap, and io_uring async I/O is noted only for Linux

How it compares

ProjectStarsTypeLevelUpdatedBest for
turso (this)25.1kLibraryintermediate4 days agoDevelopers who want an embedded SQLite-compatible database in a Rust, JavaScript, Python, Java, Go, or .NET project
libsql17.3kLibraryintermediate20 days agoDevelopers who already use SQLite and want extra features like embedded replicas
duckdb42.7kLibrarybeginner4 days agoAnalysts who want to run SQL directly on CSV, Parquet, or JSON files
usql10.2kCLIbeginner4 days agoDevelopers who use several different databases and want one tool for all of them
lowdb22.6kLibrarybeginner7 months agoNode.js developers building small tools or prototypes that need simple persistent storage
kysely14.3kLibraryintermediate4 days agoTypeScript developers who want SQL control without losing compile-time type checks

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.