libsql README

The project's README from github.com/tursodatabase/libsql. As one markdown file: README.md.

libSQL by Turso

libSQL

libSQL is an open source, open contribution fork of SQLite, created and maintained by Turso.

libSQL Docs · libSQL Manifesto · Turso · Turso Docs · Discord · Blog & Tutorials

MIT discord activity phorm.ai


[!IMPORTANT] Turso database and libSQL are two different projects from the same team.

libSQL (this repository) is an open-source fork of SQLite. It extends SQLite with features like embedded replicas and remote access, but inherits SQLite's fundamental limitations such as the single-writer model.

Turso database is a SQLite-compatible database rewritten from scratch in Rust. It is not a fork of SQLite — it is a completely new implementation that goes beyond what any SQLite fork can offer, including concurrent writes and bi-directional sync with offline support. Turso is currently in beta.

If you're starting a new project, you probably want to look into Turso. libSQL is actively maintained, but new features are being developed in Turso.

Documentation

We aim to evolve it to suit many more use cases than SQLite was originally designed for, and plan to use third-party OSS code wherever it makes sense.

libSQL has many great features, including:

There are also various improvements and extensions to the core SQLite:

The comprehensive description can be found here

Official Drivers

Experimental Drivers

Community Drivers

GUI Support

Getting Started

The project provides two interfaces: the libSQL API, which supports all the features, and the SQLite C API for compatibility.

To build the SQLite-compatible C library and tools, run:

cargo xtask build

To run the SQL shell, launch the libsql program:

$ cd libsql-sqlite3 && ./libsql
libSQL version 0.2.1 (based on SQLite version 3.43.0) 2023-05-23 11:47:56
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
libsql>

Docker

To run libSQL using docker, refer to the Docker Docs

Why a fork?

SQLite has solidified its place in modern technology stacks, embedded in nearly any computing device you can think of. Its open source nature and public domain availability make it a popular choice for modification to meet specific use cases.

But despite having its code available, SQLite famously doesn't accept external contributors and doesn't adhere to a code of conduct. So community improvements cannot be widely enjoyed.

There have been other forks in the past, but they all focus on a specific technical difference. We aim to be a community where people can contribute from many different angles and motivations.

We want to see a world where everyone can benefit from all the great ideas and hard work that the SQLite community contributes back to the codebase. Community contributions work well, because we’ve done it before. If this was possible, what do you think SQLite could become?

You can read more about our goals and motivation in our product vision.

Compatibility with SQLite

Compatibility with SQLite is of great importance for us. But it can mean many things. So here's our stance:

License

libSQL is licensed under an Open Source License, and we adhere to a clear Code of Conduct.

libsql (tursodatabase/libsql)

Searching Database…

17.3K ·GitHub
What is this?libSQL is an open-source fork of SQLite with open contributions: the same embeddable SQL database, extended with features like embedded replicas and remote access, while staying compatible with SQLite.
Is this a library, a server, or a command-line tool?At its core it is a C library you embed in your process, available through the libSQL API or the plain SQLite C API; the project also ships a libSQL server for remote access and a libsql command-line SQL shell.
How do I get it running locally?Build the SQLite-compatible C library and tools from the repo, then run the libsql program for an interactive SQL shell — or launch everything with Docker. In your own code, add an official language driver instead of compiling anything.
Which languages can I use it with?Official drivers cover TypeScript/JavaScript, Rust, and Go (including a no-CGO build). Python and C drivers are experimental, and the community maintains PHP, D, and Ring drivers.
What's the catch compared to a full client-server database?It keeps SQLite's fundamentals, including the single-writer model, so you don't get concurrent writes. Also, new feature work now goes to Turso — libSQL stays maintained, but it is no longer where new features land.
Does the embedded database work without a network?Yes for embedded use — libSQL runs inside your process without needing a network connection, and embedded replicas let you keep a replicated database inside your app.
I keep hearing about Turso — is that this project?No. Turso is a separate project from the same team: a SQLite-compatible database rewritten from scratch in Rust, currently in beta, with concurrent writes and offline-capable sync. libSQL is this fork — actively maintained, but new features are being developed in Turso, so new projects may want to look there first.
Is there a GUI I can use with it?Yes. Beekeeper Studio and TablePlus work on macOS, Windows, and Linux; Outerbase and libSQL Studio run in the browser; Dataflare is paid with a limited free version.
What low-level improvements does it add to SQLite's core?An ALTER TABLE extension for changing column types and constraints, randomized ROWIDs, WebAssembly user-defined functions, the ability to pass SQL strings down to virtual tables, and a virtual write-ahead log interface.
Size
190.6 MB
Stars
17.3K
Age
4y
Commits · 90 Days