COOLJAPAN
← All posts

OxiSQL 0.3.3 Released — Views Land, PostgreSQL Gets Logical Replication, and a B-Tree Corruption Bug Is Fixed

OxiSQL 0.3.3 makes SQLite views first-class, lets compound SELECTs act as FROM-clause subqueries, adds open_from_bytes for WASI/browser use and PostgreSQL logical replication, and fixes a silent b-tree index-corruption bug — the sovereign Pure Rust SQL layer for the COOLJAPAN ecosystem.

release oxisql pure-rust cooljapan noffi sql database postgres mysql sqlite datafusion

A database engine has exactly one non-negotiable job: never silently corrupt what it was trusted to store — and until this release, one interior b-tree rebalance path inside OxiSQL’s own SQLite engine could do precisely that.

On July 17 we released OxiSQL 0.3.3 — a release that makes SQLite views first-class, lets a compound SELECT act as a FROM-clause subquery or CTE, opens a database straight from an in-memory byte buffer, adds PostgreSQL logical replication, and fixes a b-tree index-page corruption bug reachable on real, index-heavy workloads.

No C. No Fortran. No libpq, no libmysqlclient, no libsqlite3, no zstd-sys — OxiSQL’s dependency graph is exactly as C-free in 0.3.3 as it was the day the oxisqlite fork replaced the last C SQLite binding. This release adds a large slice of SQL surface and closes real correctness bugs without adding a single native dependency to do either. It compiles to a single static binary and runs everywhere Rust runs — including, as of 0.3.3’s new open_from_bytes, places that never touch a writable filesystem at all.

Why OxiSQL 0.3.3 is a game changer

Every one of these was a real, load-bearing gap — not a nice-to-have:

OxiSQL 0.3.3 ends all of that:

Technical Deep Dive: where 0.3.3’s SQL surface and its correctness fixes actually live

  1. The facade and drivers (oxisql, oxisql-core, oxisql-parse, oxisql-embedded, oxisql-postgres, oxisql-mysql, oxisql-sqlite-compat, oxisql-datafusion, oxisql-pool, oxisql-migrate). One oxisql::connect(uri) dispatches by URI scheme; the Connection/Transaction/Value traits in oxisql-core unify every backend behind one async API, including the default execute_named/query_named methods every backend inherits for free.
  2. oxisqlite-core, the storage engine, is where essentially all of 0.3.3’s SQL-surface growth and correctness fixes live: the view catalog and FROM-clause expansion, the compound-SELECT-as-subquery coroutine path, the translate/ planner (CTAS, EXCEPT/INTERSECT, ON CONFLICT clauses), the B-tree/pager/WAL layer (the corruption fix, the MVCC durability fix, the WAL-checkpoint bookkeeping fix), and the VDBE executor (REGEXP, the new printf() specifiers).
  3. oxisql-postgres carries the new opt-in replication feature. Because tokio-postgres itself cannot negotiate replication mode, PgReplicationConnection drives the wire protocol directly through a new postgres-protocol dependency — full pgoutput decoding, COPY BOTH streaming via a background reader task plus a periodic Standby Status Update keepalive, and a brace/quote/escape-aware decoder for PostgreSQL’s {...} array-literal text format.
  4. The patch-shim layer (whoami-patched, zstd-shim, rustls-rustcrypto-patched, applied via [patch.crates-io]) keeps the whole --all-features workspace — DataFusion’s Arrow IPC path included — free of objc2-system-configuration, zstd-sys, and the CRL-parsing CVE, untouched by anything in this release.

Getting Started

cargo add oxisql --features sqlite,pool-sqlite-compat

Views are the headline addition — they work the way you’d expect inside the C-free oxisqlite engine:

use oxisql::SqliteConnection;
use oxisql::prelude::*;

#[tokio::main]
async fn main() -> Result<(), oxisql::OxiSqlError> {
    let conn = SqliteConnection::open_memory().await?;
    conn.execute("CREATE TABLE users (id INTEGER, name TEXT, active INTEGER)", &[]).await?;
    conn.execute("INSERT INTO users VALUES (1, 'Alice', 1), (2, 'Bob', 0)", &[]).await?;

    // CREATE VIEW / querying views is new in 0.3.3.
    conn.execute(
        "CREATE VIEW active_users AS SELECT id, name FROM users WHERE active = 1",
        &[],
    ).await?;
    let rows = conn.query("SELECT name FROM active_users ORDER BY name", &[]).await?;
    for row in &rows {
        println!("{:?}", row); // → Alice
    }
    Ok(())
}

And 0.3.3’s other new entry point — opening a database directly from bytes, no filesystem required:

use oxisql::SqliteConnection;

#[tokio::main]
async fn main() -> Result<(), oxisql::OxiSqlError> {
    let image: &[u8] = include_bytes!("bundled.sqlite");
    let conn = SqliteConnection::open_from_bytes(image).await?;
    let rows = conn.query("SELECT count(*) FROM sqlite_master", &[]).await?;
    println!("{:?}", rows);
    Ok(())
}

What’s New in 0.3.3

Tips

This is the foundation

OxiSQL’s facade/driver layer is 10 crates sitting on the 7-crate, C-free oxisqlite-* engine, alongside a perf benchmark crate and three vendored [patch.crates-io] shim crates (whoami-patched, zstd-shim, rustls-rustcrypto-patched) that exist solely to keep the --all-features build genuinely C-free. As of 0.3.3: 2,157 tests passing with default features, 2,651 with --all-features, 0 failing, 0 clippy warnings, across roughly 178,591 lines of Rust in 484 source files.

OxiSQL itself sits on OxiTLS (transport/TLS), oxicode (row serde), OxiCrypto (encryption-at-rest), and OxiStore (lower storage layer). It is depended on by oxirouter, oxirs, oxify, oxigdal-db-connectors, oximedia, oxigaf, and oxirag — the database tier each of those reaches for when it needs SQL.

Repository: https://github.com/cool-japan/oxisql

Star the repo if you want a SQL layer where “add views” doesn’t mean waiting for a rewrite, and a b-tree that never silently corrupts a page during a routine index rebalance.

The era of choosing between “a SQL engine with real SQL surface” and “a SQL engine without C” is over. Pure Rust SQL — sovereign, safe, and now correct on the paths that used to corrupt — is here.

KitaSan at COOLJAPAN OÜ July 17, 2026

↑ Back to all posts