Stoolap: High-performance embedded SQL database in pure Rust
39 points
5 hours ago
| 6 comments
| github.com
| HN
sudarshnachakra
9 minutes ago
[-]
Does this support concurrent writers (unlike sqlite)? Quite an impressive feature set for a one-person project.

Also is this a single file DB? If so is the format stable?

reply
Sytten
1 hour ago
[-]
In the same area, I am tracking the Rust rewrite of sqlite by Turso [1]. The big advantage is the file format compatibility.

[1] https://github.com/tursodatabase/turso

reply
jdub
2 hours ago
[-]
What an impressive release!

It makes me very curious.

Delivered to GitHub fully-formed: A grand total of 9 commits (mostly docs and CI fixes), all in the last 5 hours, and v0.1.0 released 3 hours ago.

No external database/storage-layer dependencies, so it's not "just" a CLI/server/parser wrapper around other libraries doing the "real work".

It appears to have a substantial test suite (76% code coverage, not skipping the scary bits), and great documentation.

There's a bit of context on https://github.com/stoolap but not much else about the author, project goals, relationship to other systems, e.g. it could be the data layer for something else.

(Interestingly, there's an archived stoolap-go repo with a very similar Go implementation of a columnar/hybrid database, so this is not the author's "first draft".)

reply
esafak
39 minutes ago
[-]
I too am curious how to the first commit came about: https://github.com/stoolap/stoolap/commit/768eb836de0ff072b8...

Note to owner: CI is broken.

reply
forgotpwd16
1 hour ago
[-]
Can assume they worked on this last few months when they stopped development in the, now archived, Go attempt, but they scrapped the entire git history on publication. Still, even if consider heavy AI use, looks like they put quite the effort in this.
reply
Arcuru
3 hours ago
[-]
> Time-Travel Queries: Query historical data at any point in time:

The example here looks like it may be storing the full history of transactions? Is that right? That's a pretty high cost to pay for something that's not touted as a marquee feature.

I'm working on a DB[1] that stores full transaction history but it's so that I can support decentralized synchronization. It's in service of my marquee feature so I need to pay the cost of storing history, but I'm surprised that Stoolap also seems to be doing it for a local embedded database.

[1] https://github.com/arcuru/eidetica

reply
rich_sasha
3 hours ago
[-]
Looks very interesting!

Some comparison to another embedded SQL DB, i.e. sqlite3, would be useful. How abusable is it? What tradeoffs are taken? Etc.

reply
seg_lol
3 hours ago
[-]

    Initial release: Stoolap - A Modern Embedded SQL Database in Pure Rust
    
    Stoolap is a high-performance embedded SQL database featuring:
    
    Core Features:
    - Full ACID transactions with MVCC (READ COMMITTED & SNAPSHOT isolation)
    - Cost-based query optimizer with adaptive execution
    - Parallel query execution via Rayon
    - 101+ built-in functions (string, math, date/time, JSON, aggregate, window)
    - Multiple index types: B-tree, Hash, Bitmap (auto-selected or explicit)
    - Multi-column composite indexes
    - WAL + snapshots with crash recovery
    
    SQL Support:
    - JOINs (INNER, LEFT, RIGHT, FULL OUTER, CROSS)
    - Subqueries (scalar, IN, EXISTS, correlated)
    - Common Table Expressions (WITH and WITH RECURSIVE)
    - Window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.)
    - ROLLUP, CUBE, GROUPING SETS
    - Temporal queries (AS OF TIMESTAMP/TRANSACTION)
    - Views, RETURNING clause, ON DUPLICATE KEY UPDATE
    
    104K lines of Rust | No C dependencies | Full documentation at stoolap.io
reply