TursoDB vs Stoolap
SQLite-compatible sync ecosystem vs. a pure Rust HTAP engine with time-travel queries and parallel OLAP.
Engineering Verdict
Stoolap is an impressive pure Rust embedded HTAP engine packing full MVCC (Read Committed & Snapshot Isolation),
AS OFtime-travel queries, rich index types (B-Tree, Hash, Bitmap, HNSW), and Rayon-parallelized analytics into a single binary. TursoDB is the stronger choice when you need SQLite file/dialect compatibility, multi-language SDKs, and built-in local-to-cloud sync.
Rewritten in pure Rust from an earlier Go prototype, Stoolap targets hybrid transactional and analytical processing (HTAP) inside one embedded engine. Both Stoolap and TursoDB bring Rust memory safety and MVCC concurrent writes to embedded SQL, but they diverge on SQLite compatibility, analytical parallelism, and cloud synchronization.
Side-by-Side Technical Matrix
AS OF snapshot queries in a Rust-first ecosystemVerified Real-Hardware Benchmarks
VERIFIED RUNNative Batch Insert Throughput (50,000 rows · Prepared · Rust --release)
Higher is better · rows/sNative Primary-Key Point Lookup p99 (2,000 verified queries · Prepared)
Lower is better · ms- 3-way native Rust --release benchmark (hoisted prepared statements, latest stable crates): TursoDB 0.8.4 (WAL+FULL) beat Stoolap 0.5.1 (default normal sync) by 1.41× on 50k batch inserts (696,035 vs 492,556 rows/s), while C SQLite 3.54.1 (rusqlite bundled, WAL+FULL) led at 2,764,592 rows/s.
- All three engines delivered sub-2-microsecond verified PK point lookups at p99: Stoolap 0.5.1 led at 0.0008 ms (0.8 µs, PkGet index verified via EXPLAIN), C SQLite 3.54.1 at 0.0014 ms, and TursoDB 0.8.4 at 0.0017 ms (1.7 µs).
- SQLite ecosystem compatibility verified: standard sqlite3 3.45.1 CLI opened TursoDB 0.8.4’s .db file directly and passed PRAGMA integrity_check (ok | 50000 rows), whereas Stoolap uses a custom storage format.
bash benchmarks/run-suite.sh --only e7 View full 8-scenario Real-Hardware Benchmarks Hub →
How to Choose
- You need SQLite file-format and SQL dialect compatibility with mainstream ORMs and developer tooling.
- You want built-in local-to-cloud sync, embedded replicas, and an optional managed cloud control plane.
- Your team works in TypeScript, Python, Go, or WASM—not just Rust—and needs official idiomatic SDKs.
- You prefer disk-oriented DiskANN vector search to keep RAM usage predictable across many small databases.
- You are building a Rust application that needs hybrid OLTP + multi-core OLAP execution (via Rayon) in a single embedded engine.
- You want native
AS OFtime-travel queries to inspect historical snapshots directly in SQL. - Your queries benefit from specialized index structures—Hash, Bitmap, and in-memory HNSW vector indexes—beyond standard B-trees.
- You want explicit Read Committed and Snapshot Isolation MVCC semantics under an Apache-2.0 license.
Architectural Deep Dive
SQLite Compatibility vs. Clean-Sheet HTAP Design
TursoDB commits to SQLite’s binary file format and SQL grammar, which unlocks immediate compatibility with existing schemas and tooling while constraining internal storage layouts. Stoolap starts from a clean sheet in Rust—allowing specialized Bitmap, Hash, and HNSW indexes, native AS OF temporal queries, and Rayon work-stealing parallelism for analytical scans within one embedded database.
Local HTAP Power vs. Distributed Sync Infrastructure
Stoolap focuses entirely on maximizing single-node embedded capabilities—combining transactional OCC writes with parallel analytical execution inside your process. TursoDB invests heavily in what happens across nodes: async I/O, local-to-cloud synchronization, embedded replicas, and multi-tenant cloud orchestration.
Code Comparison
use turso::Builder;
let db = Builder::new_local("state.db").build().await?;
let conn = db.connect()?;
conn.execute("BEGIN CONCURRENT", ()).await?;
conn.execute("INSERT INTO metrics VALUES (1, 0.42)", ()).await?;
conn.execute("COMMIT", ()).await?; use stoolap::Database;
let db = Database::open("file://./stoolap.db")?;
db.execute("CREATE TABLE metrics (id INTEGER PRIMARY KEY, val FLOAT)", ())?;
db.execute("INSERT INTO metrics VALUES ($1, $2)", (1, 0.42))?; Developer FAQ
How do Stoolap’s HNSW indexes compare to TursoDB’s DiskANN vectors?
HNSW excels at low-latency in-memory vector search on a single node, while DiskANN is designed to stay memory-efficient on disk—especially valuable when hosting many concurrent per-tenant databases.
What are Stoolap’s `AS OF` time-travel queries useful for?
Because Stoolap maintains MVCC row versions, AS OF lets you query a table as it existed at a prior timestamp or transaction snapshot—useful for auditing, debugging, and point-in-time analytics without restoring backups.
Is Stoolap compatible with SQLite files or drivers?
No. Stoolap uses its own storage format and SQL engine rather than SQLite’s file format, whereas TursoDB maintains SQLite compatibility.
Test TursoDB in Your Own Stack
Open a local SQLite-compatible file in Rust, TypeScript, Python, or Go—then attach cloud sync when you need multi-region replication.
Related Comparisons
SQLite-compatible Rust engine with native sync vs. KipData’s KV-backed “SQL as a Function” library for Rust.
Rust engine with SQLite compatibility & cloud sync vs. pure Go zero-CGO SQL backed by Pebble KV.
Async Rust rewrite with concurrent MVCC writes and native cloud sync vs. the battle-tested C original.
Portable open-source engine with offline local-first sync vs. serverless SQLite coupled to Cloudflare Workers.