v0.1.0
MoodengSQL
A PostgreSQL-inspired database in Rust. Same wire protocol, subset of SQL, single-node — aimed at apps that do not need full Postgres.
cargo build --release
./target/release/moodengsql --data-dir ./moodeng_data
./target/release/moodeng # another terminal In short
- PostgreSQL wire protocol (psql, libpq, moodeng CLI)
- WAL + checkpoint, transactions, B-tree indexes
- SCRAM-SHA-256, TLS, backup/restore, Prometheus metrics
- Dockerfile + compose, 48 tests in CI
Release build on a local machine: ~70k rows/s insert,
~123k qps indexed point-select.
cargo test --workspace — 48 tests.
Example
CREATE TABLE users (
id INT PRIMARY KEY,
name TEXT NOT NULL,
email TEXT
);
INSERT INTO users VALUES (1, 'Alice', 'alice@moodeng.dev');
SELECT * FROM users WHERE id = 1; Crates
moodeng-core/ storage, WAL, SQL executor
moodeng-server/ PostgreSQL wire protocol (tokio)
moodeng-cli/ moodeng interactive client SQL support
- CREATE / DROP TABLE, CREATE INDEX
- INSERT, SELECT, UPDATE, DELETE
- INSERT … ON CONFLICT (upsert)
- BEGIN, COMMIT, ROLLBACK
- JOIN, GROUP BY, ORDER BY, LIMIT, EXPLAIN
- INT, FLOAT, TEXT, BOOL, TIMESTAMP, JSON
Not trying to be
- Drop-in replacement for all of PostgreSQL
- Replication or read replicas
- Views, triggers, window functions
- Multi-node / warehouse scale
Benchmark
5,000 row insert, 500 indexed selects. CI enforces a 500 rows/s / 500 qps floor.
cargo run --release --example benchmark -p moodeng-core Production setup (TLS, SCRAM, backups) is in the production guide. Questions → GitHub issues.