About this project
FrankenSQLite is an independent, ground-up reimplementation of SQLite written in Rust, aiming to address SQLite's single-writer bottleneck and durability concerns. It introduces page-level Multi-Version Concurrency Control (MVCC) to allow concurrent writers, replacing the traditional file-level lock. The engine is designed with a safe Rust core, limiting `unsafe` code to the VFS and optional C ABI shim.
**Key Features:**
- **Concurrent Writers:** Page-level MVCC with Serializable Snapshot Isolation (SSI) by default, allowing writers touching different pages to overlap. Same-page conflicts currently abort and retry with `SQLITE_BUSY_SNAPSHOT`; a safe write-merge ladder is dormant.
- **File Format Compatibility:** Reads and writes standard SQLite 3.x databases, supporting UTF-8 and UTF-16 text encodings. Parity verification is deepest on UTF-8.
- **Safe Rust Engine:** The core engine, pager, parser, VDBE, and related crates forbid `unsafe` code, with exceptions only in `fsqlite-vfs` (mmap/shm) and `fsqlite-c-api` (FFI).
- **Layered Architecture:** A 28-member Cargo workspace with crates for types, errors, VFS, pager, WAL, MVCC, B-tree, parser, planner, VDBE, functions, and extensions (FTS5, JSON1, R-tree, ICU, etc.).
- **Durability Research:** Includes RaptorQ/ECS building blocks for potential self-healing storage, but this is design plus partial implementation, not yet live in compatibility mode.
- **Transaction Observability:** PRAGMA surfaces for transaction stats, active transactions, advisor warnings, and JSON timelines.
**Current Status:** The runtime is hybrid, with compatibility mode over standard SQLite files as the live path. Native mode and ECS sections are design plus partial implementation. The CLI is a small shell, not a full sqlite3 front-end. Extensions like FTS3/FTS4 are helper-level only; `dbstat`, `carray`, and `dbpage` are not implemented. The planner crate exists but is not the primary hot path for all queries.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.