SQLite, everywhere
your app runs
.
SQL Anywhere is a fork of SQLite that keeps full file-format and API compatibility while adding what you need to run SQLite beyond a single local file: embedded replicas, a network server, and continuous backup to object storage.
- Reads
- <1ms
- Compat
- 100%
- License
- MIT
// An embedded replica that syncs in the background let db = Builder::new_local_replica("local.db") .build().await?; db.sync().await?; // pull latest frames let conn = db.connect()?; // reads served locally conn.query("SELECT email FROM users", ()) .await?;
Prebuilt server binaries
Grab the sqld server for your platform, or
build from source.
macOS · Apple Silicon
crsqlite-v0.3.1-aarch64-apple-darwin.tar.gz
377 KB
macOS · Apple Silicon
sqld-v0.3.1-aarch64-apple-darwin.tar.gz
11.9 MB
Linux · ARM64
crsqlite-v0.3.1-aarch64-unknown-linux-gnu.tar.gz
678 KB
Linux · x86_64
crsqlite-v0.3.1-x86_64-unknown-linux-gnu.tar.gz
633 KB
Linux · ARM64
sqld-v0.3.1-aarch64-unknown-linux-gnu.tar.gz
12.5 MB
Linux · x86_64
sqld-v0.3.1-x86_64-unknown-linux-gnu.tar.gz
12.8 MB
The SQLite you know,
ready for the network.
Start with the embedded Rust API for sub-millisecond local reads. Promote it to a replica, expose it over HTTP with the server, and stream the WAL to S3 — without ever leaving the SQLite file format.
Embedded replicas
Keep a live, local copy of a remote database inside your process. Reads are served locally in sub-milliseconds; writes sync in the background.
Replication
Ship the write-ahead log from a primary to replicas with frame injection — the building blocks for read replicas and embedded replicas alike.
Server mode (sqld)
Expose SQLite over HTTP and WebSockets so remote clients talk to it like PostgreSQL or MySQL — with namespaces and an admin API.
Multitenancy & namespaces
Serve many independent databases from a single sqld instance, with path-based routing and wildcard domains for local development.
Bottomless storage
Continuously stream the write-ahead log to S3-compatible object storage for durable, point-in-time-recoverable databases.
Encryption
At-rest and in-transit encryption built in, so sensitive data stays protected on disk and across the wire.
Offline writes
Accept writes while disconnected and reconcile when the connection returns — ideal for edge and mobile.
Native vector search
Store embeddings in vector columns and run hybrid (vector + FTS5) similarity search with a built-in, quantizable DiskANN index — no extension required.
Pluggable virtual WAL
A virtual write-ahead log interface lets you swap in custom WAL backends for replication and storage.
Drop-in SQLite
Databases that don't use the extra features stay byte-compatible with stock SQLite tooling and the C API.
Extensions
ALTER TABLE type changes, randomized ROWID, WebAssembly UDFs, and xPreparedSql on top of the core engine.
Bindings everywhere
Async Rust API plus C and WebAssembly bindings — embed the same engine from native apps to the browser.
-- A table with a 4-dimensional vector column CREATE TABLE movies ( title TEXT, embedding F32_BLOB(4) ); INSERT INTO movies VALUES ('Inception', vector32('[0.1,0.2,0.3,0.4]')); -- Build an approximate-nearest-neighbour index CREATE INDEX movies_idx ON movies (libsql_vector_idx(embedding)); -- Query the nearest neighbours SELECT title FROM vector_top_k( 'movies_idx', vector32('[0.2,0.1,0.4,0.3]'), 5) JOIN movies ON movies.rowid = id;
Embeddings are a
first-class column.
Store embeddings directly in vector columns and run fast similarity search with a built-in DiskANN index — no separate vector database, no extension to install. It is just SQL. 0.3 turns it into a full local-first RAG toolkit.
- Hybrid search — fuse vector similarity with FTS5 keyword search via Reciprocal Rank Fusion
- Quantized indexes (float16 | float8 | 1-bit) shrink the on-disk graph up to 5.5× for edge devices
- embed(text, dims) turns text into a vector literal inline — no pre-compute step
- Approximate nearest-neighbour search via libsql_vector_idx + vector_top_k
A superset, not a
rewrite.
SQL Anywhere keeps the SQLite file format and C API intact. Your existing databases, queries, and tooling keep working — you opt into replication, the server, and bottomless storage only when you need them.
- Byte-compatible with stock SQLite files
- Same C API — existing bindings keep working
- Add replication and server mode incrementally
- Free and open source under the MIT license
# A drop-in SQLite shell $ ./sqlanywhere mydata.db SQL Anywhere version 0.3.1 (based on SQLite version 3.43.0) # Run it as a network server $ sqld --http-listen-addr 0.0.0.0:8080 ✓ HTTP + WebSocket (Hrana) ✓ bottomless → S3 (WAL stream)
One engine,
local to global.
Embed it, replicate it, or serve it over the network. Free, open source, and fully SQLite-compatible.