Overview Stoolap is an embedded SQL database with MVCC transactions, written entirely in Rust. It supports both in-memory and persistent storage modes with full ACID compliance. Installation # Add to Cargo.toml [dependencies] stoolap = " 0.1 " Or build from source: git clone https://github.com/stoolap/stoolap.git cd stoolap cargo build --release Quick Start As a Library use stoolap :: Database ; fn main ( ) -> Result < ( ) , Box < dyn std :: error :: Error > > { let db = Database :: open_in_memory ( ) ? ; db . execute ( "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)" , ( ) ) ? ; db . execute ( "INSERT INTO users VALUES (1, 'Alice')" , ( ) ) ? ; for row in db . query ( "SELECT * FROM users" , ( ) ) ? { let row = row? ; println ! ( "{}: {}" , row . get :: < i64 > ( 0 ) ? , row . get :: < String > ( 1 ) ? ) ; } Ok ( ( ) ) } Command Line ./stoolap # In-memory REPL ./stoolap --db " file:///path/to/data " # Persistent database ./stoolap -q " SELECT 1 + 1 " # Execute query directly Features MVCC Transactions Full multi-version concurrency control with two isolation levels: -- Read Committed (default) BEGIN ; UPDATE accounts SET balance = balance - 100 WHERE id = 1 ; UPDATE accounts SET balance = balance + 100 WHERE id = 2 ; COMMIT ; -- Snapshot Isolation BEGIN TRANSACTION ISOLATION LEVEL SNAPSHOT; SELECT * FROM accounts; -- Consistent view throughout transaction COMMIT ; Time-Travel Queries Query historical data at any point in time: -- Query data as it existed at a specific timestamp SELECT * FROM orders AS OF TIMESTAMP ' 2024-01-15 10:30:00 ' ; -- Query data as of a specific transaction SELECT * FROM inventory AS OF TRANSACTION 1234 ; -- Compare current vs historical data SELECT current . price , historical . price AS old_price FROM products current JOIN products AS OF TIMESTAMP ' 2024-01-01 ' historical ON current . id = historical . id WHERE current . price != historical . price ; Index Types Stoolap automatically selects optimal index types, or you can specif...
First seen: 2025-12-12 02:39
Last seen: 2025-12-12 13:44