Pre-1.0 — read before upgrading
Twill DB is 0.x: interfaces, the SQL surface, and on-disk/storage formats may change between releases, and backward compatibility is not guaranteed until 1.0.0. Pin an exact version. Versions track the Cargo workspace version; the three distribution channels (npm, GitHub Releases, GHCR) all ship at the same tag.
v0.5.0 — SQL completeness, row-level security & tooling ✓ current
The biggest feature release so far, and an entirely additive one. The query frontend grows to cover the SQL most applications actually write (Phase 6), row-level security lands inside the engine (Phase 7), Node and PHP join Bun as embedded clients, and Twill DB gains real command-line tooling — a project scaffolder and a full database-management CLI. Because the storage seam never moved — ENGINE_ABI_VERSION stays 3, STORAGE_TRAIT_VERSION stays 3 — every one of these features branches, scales to zero, and restores point-in-time for free.
A much larger SQL surface (Phase 6)
The hand-written frontend grows in two stages without touching the seam. 6A fills in expression-level and single-table SQL — CASE, CAST/::, IN/BETWEEN, string concatenation with ||, NULLS FIRST/LAST, RETURNING, upserts via ON CONFLICT, and INSERT … SELECT. 6B moves to multi-table work: views, joins, qualified names, DISTINCT, set operations, derived tables/CTEs, correlated and non-correlated subqueries, join-driven DML, and grouped aggregation. Together they take the engine from a deliberately narrow subset to something that runs the queries an everyday app issues; anything still unsupported returns a clean ENGINE_ERR_SQL rather than mis-parsing.
Row-Level Security, built in (Phase 7)
RLS is now enforced inside the engine, over the same MVCC snapshot every query already passes through. You declare policies with CREATE/DROP POLICY and switch enforcement on with ALTER TABLE … ENABLE ROW LEVEL SECURITY; both are persisted as additive WAL catalog facts, so policies travel with the database and its branches. Each connection carries a session context — a role plus JWT claims, set via SET ROLE and SET twill.jwt.claims — that policy expressions read through auth.uid(), auth.role(), and auth.claim(). Enforcement is default-deny: USING predicates filter reads, WITH CHECK governs writes, RETURNING is filtered to visible rows, and there is an explicit, off-by-default bypass that is never inferred from a role name. Policies reflect through pg_policies. JWT verification and identity stay composed around the engine, so PostgREST-style stacks keep working unchanged.
Command-line tooling
Two CLIs ship. The dependency-free twilldb scaffolder generates a ready-to-run starter app (new/init, including a --vector HNSW template). The database-management CLI (spec 19) adds day-to-day operations — sql, shell, tables, migrate, gen types, seed, stats, branch, db reset, schema dump, and serve — and works both embedded (file:///s3://) and over the wire (postgres://), with the transport chosen by the connection-string scheme.
Node & PHP clients
@twilldb/node (koffi FFI) and twilldb/twilldb (PHP FFI) join the Bun client with the same surface, bringing Twill DB to Node, Next.js, Astro, and Vite on the JavaScript side and to Laravel and CodeIgniter on the PHP side.
Also in this release
- Vector hardening: HNSW
ef_searchrecall tuning, maintenance for delete-heavy churn, and page-layout improvements. - Twill Bench validation campaign (spec 15 / #53): scenarios, correctness profiles (counter, bank-transfer, inventory, document-editing), a
comparediff, thestats()observability surface, scale-to-zero cold-read, a serverless-efficiency report,burstautoscaling-stress, a long-run soak with leak/drift detection, a feature-gated custom YAML-profile loader, and the spec-09 sweeps, gates, and boundary tables. - Relicensed to BUSL-1.1 with a maintainer-led, no-PR policy; a full v0.4 documentation set (architecture, storage, connection guides) and the Phase 6 completeness map.
- Fix: the long-run soak gate no longer flakes on noisy p99 tail latency. p99 is a per-window tail statistic rather than a cumulative leak gauge, so a single slow commit on a shared CI host could fit a false upward trend; p99 is now informational while memory and fd growth remain the gated leak signals.
v0.4.0 — Distribution & benchmarking ✓ shipped
The release that makes Twill DB installable and measurable: a real distribution story plus the validation tooling to back the performance and correctness claims.
Highlights
- Multi-channel distribution. Three channels at one version —
@twilldb/bun+ per-platform binary packages on npm; prebuiltlibengine.{so,dylib,dll}+engine.hon GitHub Releases; theengine-servercontainer on GHCR. - Twill Bench CLI foundation (spec 15). One driver that answers is it fast, is the data still correct under stress, and how efficiently did the serverless architecture use compute — over both transports (embedded FFI + pgwire) and both backends (
file:///s3://). - SQL Compatibility & Mapping spec (spec 16). A precise map of the PostgreSQL/SQLite surface onto Twill, setting up the additive Phase 6 frontend growth.
Also
- Privacy-first Google Analytics 4 with a Consent Mode v2 cookie banner on the docs site.
- CI builds both macOS targets on Apple-Silicon runners.
- Phase-5 composition groundwork: better-auth adapter, pooler guidance, DuckDB analytics, and PostgREST reflection/data-path.
v0.3.2 — Durability proof & throughput
Hardening the most important promise — that an acknowledged commit survives a crash — and adding the lever that keeps commits fast.
- Crash-safety gate (Experiment 4). A fault-injecting object store fires at a chosen CAS-append; the reopened store must show zero acked-write loss and zero torn/half state across a seed sweep. This runs as an explicit CI step before any tool stores real data.
- Group commit. Concurrent commits coalesce into one durable append via a leader/follower coordinator — amortizing the
fsync/CAS round-trip across the batch without ever acking before durable. - Benchmark harness across embedded FFI and pgwire, plus hot-row contention tests.
- Docs: a "Copy as Markdown" button and
/llms.txtso the documentation drops cleanly into an AI agent; the Twill DB wordmark as the site brand.
v0.3.1 — Website, brand & supply chain
- Project website + documentation repurposed onto GitHub Pages under
pages/(home, docs, specs, release; one shared design system, no build step). - Rebrand from
bydesigns-dbto Twill DB (twill-db). - Supply-chain hardening: Dependabot config and CodeQL scanning.
v0.3.0 — Branching, lifecycle & vector search
The release that turned an embeddable engine into a serverless platform: instant clones, scale-to-zero, and an in-core vector capability — all additive, because the seam never moved.
- Copy-on-write branching (Phase 4). A branch is a storage-seam concern — a parent read-through below the fork LSN plus a private write overlay — so the same O(1), copies-nothing semantics serve
file://and object stores alike. - Durable single-writer lease. Acquire / renew / release fenced by a monotonic CAS epoch — the split-brain guard.
- Lifecycle controller (
twill-controller). ACold→Warming→Active→Idle→Stopping→Coldmachine with an idle reaper, lease heartbeat, and thundering-herd admission — true scale-to-zero, with the engine core staying thread-free. - In-core vector search (Phase 5). A
vector(N)type, an HNSW index (CREATE INDEX … USING hnsw), the distance operators<->/<=>/<#>, and top-k KNN. Because the index rides the same WAL/replay path as rows, it branches and re-warms with the database. - Versions:
ENGINE_ABI_VERSION→ 3,STORAGE_TRAIT_VERSION→ 2. All additive.
v0.2.0 — Foundations: the engine and its two doors
The first published release. It established the whole architecture: one engine, one pluggable seam, two front doors, two backends.
- Embedded engine core (Phase 1). SQL → MVCC snapshot isolation → crash-safe WAL with deterministic replay, the pluggable
Storagetrait (the seam),LocalFileStorage, and the frozen C ABI bound into Bun viabun:ffi. - Object-storage backend (Phase 2). A second
Storageimpl — an LSM page store + S3-CAS commit log — making the database disaggregated and scale-to-zero capable while staying embedded. Flip the connection string fromfile://tos3:///r2:///gs://and the same binary bottoms out on object storage. - Server mode + pgwire (Phase 3). The same engine behind a Postgres-wire listener —
psql,Bun.sql,pgbench, and PostgREST connect with no bespoke driver.
Versioning & compatibility markers
Two internal version numbers track compatibility and appear throughout these notes: ENGINE_ABI_VERSION (the frozen C embedding contract — the Bun wrapper refuses a mismatched binary) and STORAGE_TRAIT_VERSION (the storage seam). They are bumped only on a contract change, and the project's discipline is that growth stays additive so the seam never moves. Current: ABI 3, Trait 3.