oxisqlite-core
The engine core of the C-free oxisqlite engine — a Pure-Rust fork of limbo 0.0.22, internal to the OxiSQL workspace.
This is the heart of the engine that powers the oxisql-sqlite-compat backend.
It contains:
-
the VDBE bytecode interpreter,
-
B-tree storage, the pager, and WAL,
-
SQL → bytecode translation with a System-R cost-based optimizer,
-
ANALYZE statement +
sqlite_stat1cardinality statistics, -
MVCC transaction machinery (full
ROLLBACK,SAVEPOINT), -
UPSERT
ON CONFLICT DO UPDATE/DO NOTHINGwithexcluded.*, -
JSON / JSONB support, and
-
the SQL built-in functions.
-
Role: engine core (interpreter, storage, translation, functions).
-
Version: 0.2.1 (Unreleased).
-
Tests: 636 passing (all-features), 640 with
index_experimental, 13 skipped. -
Approx LOC: ~82,000 (after execute/ + schema/ module splits).
-
Pure Rust / no C: 100% Rust. No C allocator, no C parser generator, no
cc/build.rs.CC=/usr/bin/false cargo buildsucceeds. -
Internal: private member of the OxiSQL workspace; not published separately.
COOLJAPAN changes vs upstream limbo 0.0.22
Notable additions on top of the original fork:
-
Full-transaction
ROLLBACK. Ported fromturso_core0.7.0-pre.5 (MIT). Spanstranslate/rollback.rs,vdbe/execute/txn_schema.rs,storage/wal.rs, andstorage/pager.rs. -
SAVEPOINT/RELEASE/ROLLBACK TO SAVEPOINT. Full nested savepoint semantics with WAL-based page-state restoration; pager savepoint stack. -
ANALYZEstatement + System-R optimizer.translate/analyze.rsgenerates bytecode that writessqlite_stat1rows;statistics.rsloads them into aSchemaStatsside-map;translate/optimizer/cost.rsuses real selectivity when stats are present (backwards compatible — un-analyzed DBs unchanged). -
UPSERT
ON CONFLICT DO UPDATE / DO NOTHING.translate/upsert.rshandles all forms includingexcluded.*, per-target conflict routing, and theindex_experimentalunique-index path. -
Schema-cookie invalidation +
SchemaChanged. DDL bumps the schema cookie;op_transactionverifies it; stale statements raiseLimboError::SchemaChanged. -
Module splits via
splitrs.schema.rs(1,920 lines) →schema/(7 files);vdbe/execute.rs(8,361 lines) →vdbe/execute/(10 files). -
Pure-Rust Julian-day conversion. GPL
julian_day_converterremoved; replaced by inlinefunctions/julian_day.rs.
Fork lineage & licensing
Part of a COOLJAPAN C-free fork of limbo 0.0.22 (MIT). Full attribution, the
upstream commit, the turso_core ROLLBACK provenance, and per-component
licensing are recorded in the repo-root /NOTICE.
Copyright © 2024–2026 COOLJAPAN OU (Team Kitasan). COOLJAPAN code is licensed
under Apache-2.0; upstream limbo code remains under MIT (see
/NOTICE).
Part of the OxiSQL workspace.