Skip to content

slatefile/capstone

Repository files navigation

capstone — a relational database from scratch (Rust)

CSE 499 senior project. A real disk-based relational database engine with ACID guarantees, written from scratch in Rust.

Not a SQLite/Postgres wrapper. Not a key-value store with SQL on top. A real engine: page manager, buffer pool, B+ tree indexes, WAL + ARIES-style recovery, MVCC for concurrent reads, a hand-written SQL parser, a cost-based query planner, and a query executor.

Status

Pre-Sprint-1. Bootstrap in progress.

What's planned

Layer Crate What it does
CLI rustdb-cli psql-style interactive shell
Library entry rustdb Top-level DB handle, embeds all layers
Execution executor Seq scan, index scan, hash join, nested-loop join
Optimization planner Cost-based query planner
Parsing sql Hand-written SQL parser (lexer + recursive-descent)
Concurrency txn Transaction manager + MVCC + lock manager
Durability wal Write-ahead log + ARIES recovery
Storage storage Pages, buffer pool, B+ tree

Build

cargo build --workspace
cargo test --workspace
cargo run --bin rustdb        # CLI

Architecture

See docs/design.md.

How AI is used in this project

This project is built with Claude Code as a pair programmer. Every commit ships with a Design notes: section documenting what was picked and why. See CLAUDE.md for the working agreement.

License

MIT OR Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages