| Crates.io | vibesql |
| lib.rs | vibesql |
| version | 0.1.4 |
| created_at | 2025-12-04 05:06:47.932723+00 |
| updated_at | 2026-01-19 06:52:12.950626+00 |
| description | SQL database engine with SQL:1999 compliance |
| homepage | |
| repository | https://github.com/rjwalters/vibesql |
| max_upload_size | |
| id | 1965911 |
| size | 131,460 |
SQL:1999 compliant database in Rust, 100% AI-generated
Live Demo | CLI Guide | Python Bindings | Conformance Report
Built entirely by AI agents using Claude Code and Loom.
# Clone and build
git clone --recurse-submodules https://github.com/rjwalters/vibesql.git
cd vibesql
cargo build --release
# Run the CLI
cargo run --release --bin vibesql
# Or try the web demo
cd web-demo && npm install && npm run dev
$ cargo run --release --bin vibesql
vibesql> CREATE TABLE users (id INTEGER, name VARCHAR(50));
vibesql> INSERT INTO users VALUES (1, 'Alice'), (2, 'Bob');
vibesql> SELECT * FROM users;
+----+-------+
| id | name |
+----+-------+
| 1 | Alice |
| 2 | Bob |
+----+-------+
vibesql> \q
See CLI Guide for meta-commands, output formats, and import/export.
pip install maturin
maturin develop
import vibesql
db = vibesql.connect()
cursor = db.cursor()
cursor.execute("CREATE TABLE t (id INTEGER, name VARCHAR(50))")
cursor.execute("INSERT INTO t VALUES (1, 'Hello')")
cursor.execute("SELECT * FROM t")
print(cursor.fetchall()) # [(1, 'Hello')]
See Python Bindings Guide for full API reference.
Subscribe to SQL queries and receive automatic updates when data changes—Convex-like reactivity with full SQL power.
import { VibeSqlClient } from '@vibesql/client';
const db = new VibeSqlClient({ host: 'localhost', port: 5432 });
await db.connect();
// Subscribe to a query - get updates when data changes
const subscription = db.subscribe(
'SELECT * FROM messages WHERE channel_id = $1 ORDER BY created_at DESC LIMIT 50',
[channelId],
{
onData: (messages) => setMessages(messages),
onDelta: (delta) => {
// Efficient incremental updates
if (delta.type === 'insert') addMessage(delta.row);
if (delta.type === 'delete') removeMessage(delta.row);
},
}
);
// React hook for easy integration
function ChatRoom({ channelId }) {
const { data, isLoading } = useSubscription(db,
'SELECT * FROM messages WHERE channel_id = $1',
[channelId]
);
return <MessageList messages={data} />;
}
Features:
useSubscription, useQuery)VibeSQL achieves 10,758 TPS on TPC-C mixed workload (5.5x faster than SQLite) and passes 100% of TPC-H and TPC-DS queries.
| Suite | Coverage | Tests |
|---|---|---|
| SQL:1999 Core | 100% | 739/739 sqltest |
| SQLLogicTest | 100% | 622 files (~7.4M tests) |
| Unit Tests | - | 7,000+ tests |
| TPC-DS | 100% | 102/102 queries |
| TPC-H | 100% | 22/22 queries |
| TPC-C | 100% | All transactions |
| Database | TPS | vs SQLite |
|---|---|---|
| VibeSQL | 10,758 | 5.5x faster |
| SQLite | 1,969 | baseline |
| DuckDB | 323 | 6x slower |
Scale Factor 1, 60-second duration, mixed workload (New Order, Payment, Order Status, Delivery, Stock Level).
102/102 queries passing (100%) at SF 0.001. All queries complete within timeout.
Peak memory: ~141 MB. See full results.
22/22 queries passing (100%). All queries optimized with columnar execution and cost-based join reordering.
# Build release binaries first
cargo build --release
# Run all benchmarks
make benchmark # TPC-H, TPC-C, TPC-DS, Sysbench
# Individual benchmarks
make benchmark-tpch # TPC-H (22 queries, SF 0.01)
make benchmark-tpcc # TPC-C (OLTP, SF 1)
make benchmark-tpcds # TPC-DS (99 queries, SF 0.001)
make benchmark-sysbench # Sysbench (point lookups, range scans)
# With custom parameters
SCALE_FACTOR=0.01 PROFILING_ITERATIONS=3 cargo bench --bench tpch_profiling
TPCC_SCALE_FACTOR=1 TPCC_DURATION_SECS=10 cargo bench --bench tpcc_benchmark
See Benchmarking Guide for details on parameters and profiling.
# Full build, test, and benchmark (runs in background)
make all # Starts in background, shows monitoring instructions
make status # Check progress
make logs # Follow full output
# Individual targets
make build # Build all crates
make test # Run all tests (unit + integration + sqllogictest)
make benchmark # Run TPC-H/TPC-C/TPC-DS/Sysbench benchmarks
make all-fg # Run everything in foreground (blocking)
make help # Show all targets
| Guide | Description |
|---|---|
| TypeScript SDK | Real-time subscriptions & React hooks |
| Drizzle ORM | Type-safe queries with Drizzle adapter |
| HTTP API | REST, GraphQL, and SSE endpoints |
| CLI Guide | Command-line interface |
| Python Bindings | Python API reference |
| Scheduled Functions | Cron jobs and scheduled tasks |
| Transactions | Durability hints and savepoints |
| Vector Search | AI/ML embeddings and similarity search |
| File Storage | Blob storage with SQL integration |
| ODBC/JDBC | Database connectivity |
| Roadmap | Future plans |
| History | Development timeline |
This project originated from a challenge about AI capabilities: implement a NIST-compatible SQL database from scratch. Core SQL:1999 compliance was achieved in under 2 weeks (Oct 25 - Nov 1, 2025).
Inspired by posix4e/nistmemsql.
Can you build a SQL database faster than we did?
The VibeSQL Challenge: pass all 622 SQLLogicTest files using AI tools. Our benchmark is 25 days from first commit to 100% conformance—but we spent significant time on features beyond the core challenge (storage engine, server mode, i18n, benchmarks). A focused effort could beat this.
How to participate:
make test to track progress against 622 SQLLogicTest filesStarter templates:
| Language | Repository |
|---|---|
| Rust | challenge-seed-rust |
| C++ | challenge-seed-cpp |
| Go | challenge-seed-go |
See the challenge page for full details.
MIT OR Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.
See CLAUDE.md for development workflow with Loom AI orchestration.