SigilDB 0.2.0 — capability-native database + client suite
=========================================================

A complete database stack written entirely in Sigil: a SQL engine, a
cross-platform client/driver suite, a SQL text parser, and a MySQL-compatible
client. No C, no runtime, no dependencies. ~175 KB of engine.

Contents
--------
engines/                sigilOS arm-el0 blobs — the database itself
  sql_storage.blob      heap storage, MVCC (xmin/xmax), physical zeroing on
                        DELETE, no vacuum
  sql_index.blob        sorted-array indexes, binary search, UNIQUE and
                        composite constraints, O(1) min/max
  sql_query.blob        SELECT/WHERE/INNER+LEFT JOIN/COUNT-SUM-MIN-MAX-AVG/
                        ORDER BY/LIMIT/OFFSET
  sql_txn.blob          BEGIN/COMMIT/ROLLBACK, savepoints, undo log,
                        timeout-based deadlock prevention
  sql_schema.blob       NOT NULL, CHECK, DEFAULT, foreign-key definitions,
                        views, triggers

sigql/                  sigilOS arm-el0 blobs — the SigQL client suite
  sigql_wire.blob       unified wire protocol (replaces PG frontend/backend,
                        TDS, TNS, MySQL wire)
  sigql_conn.blob       6 transports (TCP/unix/pipe/shmem/IPC/TLS), pooling,
                        sessions
  sigql_client.blob     cursor API, connection strings, batch fetch, parameter
                        binding
  sigql_driver.blob     universal driver — ODBC/JDBC/ADO.NET/OCI equivalent
  sigql_parser.blob     single-pass SQL tokenizer + query planner

sigildb-{macos,linux,windows}   native MySQL/MariaDB client (separate archives)

Access control is the kernel's, not the database's: DDL, DML, DQL, JOIN, TXN
and PARSE are separate capabilities. There is no GRANT/REVOKE table to get
wrong, and no network surface — IPC only, cap-gated.

Test results — 260/260, measured, not transcribed
-------------------------------------------------
  SQL-STORAGE     23/23      SIGQL-WIRE      24/24
  SQL-INDEX       20/20      SIGQL-CONN      31/31
  SQL-QUERY       23/23      SIGQL-CLIENT    32/32
  SQL-TXN         21/21      SIGQL-DRIVER    19/19
  SQL-SCHEMA      28/28      SIGQL-PARSER    39/39

Every suite is compiled and booted under QEMU (raspi3b) and its result line
read off the UART. Before this release they had never been run: four of the ten
failed (230/261). All four were real defects and all four are fixed — see
docs/SQL.md in sigil-apps for the specifics. The headline one: the SQL
tokenizer stopped after a single token, so `SELECT * FROM users` parsed as one
token and the parser scored 11/39.

Install
-------
sigilOS fs-loads apps by path. Place blobs under /apps, e.g. /apps/sql_storage.
Each is a flat-v1 arm-el0 image loaded at 0x100000 (SP_EL0 0x1F0000, heap
0x200000). Engine state lives at fixed addresses above the heap (0xE80000 and
up) so the engines share one address space by design.

These are sigilOS binaries. They do not run on macOS, Linux, or Windows — the
native MySQL client archives are the host-side half.

Size, for context
-----------------
  PostgreSQL ~100 MB · Oracle ~10 GB · OCI client ~200 MB · JDBC ~10 MB
  SigilDB engines + SigQL suite: ~175 KB total, <64 KB RAM.

Source: sigil-apps/apps/data/ and apps/sigildb/. Sigil only, zero Python,
zero C.
