v0.2.0 · stable
Elyra SQL Anywhere · The Engine

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
main.rs
// 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?;
S.01 — What it does

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 approximate nearest-neighbour queries with a built-in 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.

vectors.sql
-- 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;
Vector search, built in

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.

  • Native vector columns (F32_BLOB) up to thousands of dimensions
  • Approximate nearest-neighbour search via libsql_vector_idx + vector_top_k
  • Cosine and Euclidean distance with vector_distance_cos
  • Works embedded, replicated, and on the server — same as any table
Read the docs
Full SQLite compatibility

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
Read the docs
shell
# A drop-in SQLite shell
$ ./sqlanywhere mydata.db
SQL Anywhere version 0.2.0
  (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)
Colophon — Get started

One engine,
local to global.

Embed it, replicate it, or serve it over the network. Free, open source, and fully SQLite-compatible.

Elyra SQL Anywhere · v0.2.0 Built in Norway · MMXXVI