mskql distills the core ideas of a database engine—wire protocol, parser,
query executor, storage—into ~24,000 lines of C with zero external
dependencies. One .c file per subsystem. Three AI agents built it
in iterative rounds: no human wrote any C code or SQL test. 960+ test cases,
every one memory-checked. Connect with psql on port 5433
or try it in the browser via WebAssembly.
mskql implements PostgreSQL wire protocol v3: Simple Query,
Extended Query (prepared statements, $1/$2 parameters),
and COPY. Connect with psql, pgAdmin, DBeaver, or any language driver.
Default port 5433.
make && ./build/mskql # build & start
psql -h 127.0.0.1 -p 5433 -U test -d mskql # connect
Batch latency (single client) and concurrent throughput (4 threads, 5s).
| Workload | Type | Ratio | ||
|---|---|---|---|---|
| aggregate | batch | 0.12× | mskql 8× faster | |
| distinct | batch | 0.15× | mskql 7× faster | |
| insert_bulk | batch | 0.33× | mskql 3× faster | |
| order_by | batch | 0.49× | mskql 2× faster | |
| aggregate | throughput | 9.21× QPS | 52,670 vs 5,720 QPS | |
| insert | throughput | 2.06× QPS | 56,658 vs 27,520 QPS | |
| full_scan | throughput | 0.91× QPS | network-bound |
→ Full benchmark comparison · Historical charts
Three agents in iterative rounds. Challenger writes adversarial SQL tests. Reviewer flags code-quality issues. Writer fixes until all 960+ tests pass. No human wrote any C code or SQL test cases.
A fully functional mskql database running entirely in your browser via WebAssembly—no server, no network requests. Choose an example or write your own SQL.
→ Open full playground (more space, more examples)
Ten queries from CREATE TABLE to recursive CTEs, all through psql.
Architecture — wire
protocol, parser, vectorized executor, storage. One .c file per subsystem.
SQL reference — DDL,
DML, joins, aggregation, window functions, CTEs, subqueries, 30+ built-in functions.
Grammar
Testing — 960+ test cases,
every one under a memory-safety checker. Parallel execution across all cores.
Benchmarks — mskql
vs PostgreSQL on 19 batch workloads and 7 throughput workloads.
Historical charts