explaingit

tursodatabase/libsql

16,737CAudience · developerComplexity · 3/5Setup · moderate

TLDR

An open source fork of SQLite maintained by Turso that adds remote hosting, embedded read replicas, and WebAssembly user-defined functions, extending SQLite beyond its original single-file design while accepting outside contributions.

Mindmap

mindmap
  root((libSQL))
    What it is
      SQLite fork
      Open contributions
      Turso project
    Key additions
      Remote server
      Embedded replicas
      WebAssembly UDFs
    Drivers
      TypeScript
      Rust and Go
      Python experimental
    GUI tools
      Beekeeper Studio
      TablePlus
      libSQL Studio
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a replicated local database to a mobile or desktop app so reads are instant even without an internet connection.

USE CASE 2

Host a SQLite-style database over the network and connect to it from multiple services using the TypeScript or Go driver.

USE CASE 3

Extend SQLite with a sandboxed WebAssembly user-defined function to run custom logic safely inside the database engine.

USE CASE 4

Replace a plain SQLite file with a remote libSQL server so multiple services can share the same database.

Tech stack

CRustTypeScriptGoPythonWebAssembly

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a Turso account or a self-hosted libSQL server to use embedded replicas or remote database access.

License not mentioned in the explanation.

In plain English

libSQL is an open source fork of SQLite, the small embedded database that runs inside many phones, browsers, and apps. It is created and maintained by Turso. The point of forking is twofold. First, SQLite is open source but does not accept outside contributions, and the libSQL team wants a project where the community can send pull requests. Second, they want to grow it beyond what SQLite was originally designed for, adding modern features and pulling in third-party open source code where useful. The headline additions over plain SQLite are an embedded replica system that lets your application carry a local replicated copy of a remote database for fast reads, and a separate libSQL server that exposes a SQLite-style database over the network, similar to how PostgreSQL or MySQL are accessed remotely. There are also smaller engine improvements: an extended ALTER TABLE that can modify column types, randomized ROWIDs, user-defined functions written in WebAssembly so they can be sandboxed, passing SQL text down to virtual tables, and a virtual write-ahead log interface. libSQL ships official drivers for TypeScript, Rust and Go, with experimental drivers for Python and C. Several GUI tools, including Beekeeper Studio, Outerbase, TablePlus and libSQL Studio, can connect to it. The README is clear that libSQL inherits SQLite's single-writer limitation, and points new projects toward Turso's separate Rust rewrite if they need concurrent writes and offline sync. You'd use libSQL when you want SQLite that you can replicate, host remotely, or extend with WebAssembly functions. The primary language is C, with Rust used for tooling. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Set up a libSQL server with Turso and connect to it from a TypeScript app using the official libSQL client library.
Prompt 2
Configure a libSQL embedded replica in my Go app so it syncs from a remote Turso database but reads from a local file for speed.
Prompt 3
Write a WebAssembly user-defined function in Rust and register it with a libSQL database to call from SQL queries.
Prompt 4
Show me the difference between a plain SQLite file and a libSQL embedded replica and when I should use one over the other.
Prompt 5
Connect Beekeeper Studio or TablePlus to a self-hosted libSQL server to browse and edit data with a GUI.
Open on GitHub → Explain another repo

← tursodatabase on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.