Distributed SQL database written in pure Rust (std + libc only) with a native wire protocol.
Status: Phase 24 complete — SQL compatibility hardened, txn/auth, ops assets, chaos partition gate.
- Native LSM storage —
takyonic-kv(WAL, skiplist, SSTable, bloom, leveled compaction) - Percolator MVCC —
takyonic-txnwith timestamp oracle - Raft consensus — hand-written multi-region Raft in
takyonic-raft - Native RPC — epoll/kqueue reactor in
takyonic-grpc(no tonic/gRPC) - SQL engine — parser, binder, planner, vectorized query engine in
takyonic-server - SCRAM-SHA-256 — wire authentication
- Optional wire TLS — rustls on SQL (
takyonic-server) and native RPC mesh (takyonic-grpc+takyonic-tls)
git clone https://github.com/hocestnonsatis/takyonic.git
cd takyonic
cargo build --release
./scripts/dev-cluster.shIn another terminal:
cargo run -p takyonic-cli -- -H 127.0.0.1 -p 26257CREATE TABLE users (id INT PRIMARY KEY, name TEXT NOT NULL);
INSERT INTO users (id, name) VALUES (1, 'alice');
SELECT * FROM users;cargo run -p takyonic-metad -- --addr 127.0.0.1:26259 --data-dir ./data/meta
cargo run -p takyonic-stored -- --store-id 1 --addr 127.0.0.1:26258 --metad 127.0.0.1:26259 --data-dir ./data/store1
cargo run -p takyonic-server -- --addr 127.0.0.1:26257 --metad 127.0.0.1:26259
cargo run -p takyonic-cli -- -H 127.0.0.1 -p 26257docker compose up --buildGateway on port 26257, meta on 26259, storage on 26258.
Client (takyonic-cli / takyonic-rs)
│ native wire (SCRAM + optional TLS)
▼
takyonic-server (SQL gateway + query engine)
│ native RPC (TLV)
├──────────► takyonic-metad (PD + TSO)
└──────────► takyonic-stored (Raft + takyonic-kv LSM)
| Binary | Role |
|---|---|
takyonic-server |
SQL gateway |
takyonic-metad |
Placement driver + timestamp oracle |
takyonic-stored |
Storage node (Raft + LSM) |
takyonic-cli |
Interactive SQL shell |
takyonic-soak |
Long-running chaos/soak harness |
See docs/architecture.md and docs/protocol.md.
| Crate | Purpose |
|---|---|
takyonic-kv |
Native LSM engine |
takyonic-protocol |
TLV wire codec + SCRAM |
takyonic-grpc |
epoll/kqueue RPC + TLS primitives |
takyonic-sql |
SQL parser |
takyonic-catalog |
Schema + binder |
takyonic-planner |
Rule-based planner |
takyonic-server |
Gateway + query engine |
takyonic-txn |
Percolator MVCC |
takyonic-tso |
Timestamp oracle |
takyonic-raft |
Raft consensus |
takyonic-region |
Region management |
takyonic-meta |
Placement driver |
takyonic-rs |
Rust client library |
cargo run --release -p takyonic-soak --features jemalloc -- --hours 1Pass criteria: any 30s window after 45s warmup ≥ 30k INSERT rows/sec (min_ops_sec_window), periodic COUNT(*) OK.
Diagnostic mode: cargo run --release -p takyonic-soak --features jemalloc -- --seconds 600 --diagnose
Clone the repo, then install git hooks once (runs rustfmt on commit and blocks push if CI would fail):
./scripts/install-git-hooks.sh./scripts/rustfmt-all.sh # format (same as CI)
./scripts/rustfmt-all.sh --check # verify only
./scripts/clippy-check.sh # clippy -D warnings (same as CI)
cargo test --workspace --bins -- --test-threads=2Integration tests:
cargo test -p takyonic-integration-testsLicensed under either of Apache-2.0 (LICENSE-APACHE) or MIT (LICENSE-MIT).