Can Rust’s Limbo Outpace SQLite? Inside Turso’s Async Database Rewrite
Limbo, Turso’s Rust‑based rewrite of SQLite, aims for full compatibility while adding memory safety, asynchronous I/O via io_uring, deterministic simulation testing, and WebAssembly compilation, delivering comparable or superior performance on large datasets and showcasing the challenges and benefits of re‑engineering a mature database engine.
Turso, founded by Glauber Costa and Pekka Enberg in 2021, originally forked SQLite to create libSQL, citing the need for a modernized, open‑source version. Realizing that a simple fork could not deliver features like asynchronous I/O, Enberg launched a personal project to rewrite SQLite in Rust, which became the official Turso Limbo project.
Limbo (the project codename) strives for 100% compatibility with SQLite while providing full memory safety and a modern architecture. It is released under the MIT license on GitHub.
The project incorporates deterministic simulation testing (DST) to match or exceed SQLite’s reliability, leveraging Antithesis’s tooling for fault‑injection testing. Limbo also includes its own DST framework.
On Linux, Limbo uses the kernel’s io_uring system call—originally developed by a Meta engineer—to achieve high‑performance asynchronous I/O. The new engine extends sqlite3_step to return immediately when data is not yet ready.
Performance testing shows Limbo can be faster than SQLite on large data sets, though results vary. The developers emphasize that the goal is not to claim universal speed superiority but to demonstrate solid early‑stage performance.
Limbo can be compiled to WebAssembly (WASM), a feature highlighted by Turso’s co‑founders as a “next‑step for SQLite.”
Building Limbo on macOS requires the latest Rust compiler to resolve compilation errors.
Community feedback includes skepticism about rewriting SQLite, noting that the original’s code quality and extensive test suite make it a difficult target for replacement. However, proponents argue the rewrite enables features and safety guarantees that are hard to achieve in C/C++.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
