An in-process SQL database written in Rust, compatible with SQLite's dialect, file format and C API, with an experimental Postgres frontend.
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
Build the SQLite-compatible C library and tools
cargo xtask build - 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
An open-source graph database in Rust that stores graph, vector and full-text data together on object storage, queryable from Rust, TypeScript, Go and Python.
DuckDB is an in-process analytical SQL database that runs inside your application with no separate server to manage.
An embeddable, persistent key-value database written in pure Go, with ACID transactions and SSD-oriented design.
A safe, extensible ORM and query builder for Rust that checks queries at compile time across PostgreSQL, MySQL, SQLite and MariaDB.
A TypeScript and JavaScript ORM for Node.js and other JS platforms, supporting both Active Record and Data Mapper patterns across many SQL and NoSQL databases.