Repolode
tursodatabase

tursodatabase/libsql

An open source, open contribution fork of SQLite that adds embedded replicas, a remote server mode, and extensions to the SQLite core.

Stars
17,280
Forks
547
Open issues
466
Last commit
5 days ago

What is it?

libSQL is a fork of SQLite maintained by Turso. It keeps the SQLite API and file format, so existing SQLite databases and code can be used with it, while adding capabilities aimed at use cases SQLite was not originally designed for.

The main additions are embedded replicas, which keep a replicated copy of a database inside an application, and libSQL server, which provides remote SQLite access in a way similar to PostgreSQL or MySQL. The core also includes an ALTER TABLE extension for changing column types and constraints, WebAssembly user defined functions, randomized ROWIDs, and a virtual write-ahead log interface.

The project accepts external contributions, which the maintainers position as the main difference from upstream SQLite. Drivers are provided for TypeScript/JavaScript, Rust, Go, and other languages, and a SQLite-compatible command-line shell is included. The README notes that Turso's separate Rust rewrite is where new features are being developed.

Key features

  • 01Embedded replicas that keep a replicated database inside your application
  • 02libSQL server for remote SQLite access
  • 03ALTER TABLE extension for changing column types and constraints
  • 04WebAssembly user defined functions
  • 05Official drivers for TypeScript/JavaScript, Rust, and Go

Use cases

  • Running SQLite-compatible storage with remote access over a network
  • Keeping a local, replicated database copy inside an edge or client application
  • Adding WebAssembly functions to SQLite-based applications

Quick start

  1. 1

    Build the SQLite-compatible C library and tools

    cargo xtask build
  2. 2

    Launch the SQL shell from the libsql-sqlite3 directory

    cd libsql-sqlite3 && ./libsql

Things to know

  • Inherits SQLite's single-writer model, so it does not support concurrent writes.
  • The README recommends Turso instead for new projects, since new features are being developed there.

Topics

FAQ

What is libsql?
An open source, open contribution fork of SQLite that adds embedded replicas, a remote server mode, and extensions to the SQLite core. libSQL is a fork of SQLite maintained by Turso. It keeps the SQLite API and file format, so existing SQLite databases and code can be used with it, while adding capabilities aimed at use cases SQLite was not originally designed for.
Is libsql free to use? What license does it have?
libsql is open source under the MIT license. Check the license terms before using it in commercial products.
Is libsql still maintained?
Actively maintained. The last commit to libsql was on Oct 17, 2026.
What can I use libsql for?
Running SQLite-compatible storage with remote access over a network Keeping a local, replicated database copy inside an edge or client application Adding WebAssembly functions to SQLite-based applications
How do I install libsql?
Build the SQLite-compatible C library and tools: cargo xtask build Launch the SQL shell from the libsql-sqlite3 directory: cd libsql-sqlite3 && ./libsql
Where can I get libsql?
The source code and installation instructions are on GitHub: https://github.com/tursodatabase/libsql

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects