Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsApr 12, 2026·3 min de lecture

libSQL (Turso) — Open-Contribution Fork of SQLite

libSQL is a fork of SQLite that is both open source and open to contributions. Created by Turso to add features SQLite cannot: embedded replicas, server mode, vector search, and ALTER TABLE extensions. The edge database for modern apps.

Introduction

libSQL is a fork of SQLite that is both open source (MIT) and open to community contributions. Created by the Turso team because SQLite is open source but does not accept external contributions. libSQL adds features that SQLite has historically refused: server mode, embedded replicas, vector search (via vectorlite), ALTER TABLE extensions, and encryption at rest. Turso provides a managed edge database service built on libSQL.

What libSQL Does

  • SQLite compatible — full SQLite API and file format
  • Server mode — HTTP and WebSocket access (sqld)
  • Embedded replicas — local SQLite file synced from remote
  • Vector search — F32_BLOB type + vector distance functions
  • ALTER TABLE — DROP COLUMN and other extensions
  • Encryption — at-rest encryption
  • Multi-tenancy — schema-based namespace isolation
  • Edge deployment — replicas at edge locations
  • TypeScript/Rust/Go/Python clients — official SDKs
  • Turso managed — global edge DB service

Architecture

Fork of SQLite C codebase with extensions. sqld (server daemon) wraps libSQL and serves HTTP/WebSocket/gRPC. Embedded replicas sync WAL frames from primary to local SQLite file on the client. Turso infrastructure distributes replicas globally via Fly.io.

Self-Hosting

# Run sqld server
docker run -d --name libsql -p 8080:8080 \
  -v libsql-data:/var/lib/sqld \
  ghcr.io/tursodatabase/libsql-server:latest

# Connect
curl http://localhost:8080/v2/pipeline -d "{\"requests\": [{\"type\": \"execute\", \"stmt\": {\"sql\": \"SELECT 1\"}}]}"

Key Features

  • Full SQLite compatibility
  • Server mode (HTTP + WebSocket)
  • Embedded replicas
  • Vector search
  • ALTER TABLE extensions
  • Encryption at rest
  • Multi-tenancy
  • Edge deployment (Turso)
  • Official SDKs (TS, Rust, Go, Python)
  • Open to contributions (unlike SQLite)

Comparison

Database Type Server Mode Vector
libSQL SQLite fork Yes (sqld) Yes
SQLite Embedded No No
LiteFS SQLite replication Proxy No
Cloudflare D1 SQLite managed Yes No
PlanetScale MySQL managed Yes No
Neon Postgres managed Yes Via pgvector

FAQ

Q: Difference from SQLite? A: libSQL is a superset of SQLite. It adds a server mode, embedded replicas, vector search, and ALTER TABLE extensions. The upstream SQLite project doesn't accept external contributions; libSQL is completely open.

Q: What is Turso? A: Turso is a managed edge database service built on libSQL. Database replicas are deployed across global edge nodes (Fly.io) with read latency <50ms. Free tier offers 9GB of storage and 500 DBs per month.

Q: What scenarios is it for? A: Scenarios needing SQLite's simplicity plus remote access, multiple replicas, or vector search. Examples: SaaS multi-tenant, mobile app local cache + cloud sync, edge worker data layer.

Sources

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires