Skip to content

A high-performance embedded database library written in Rust, featuring LSM-tree storage and MVCC transactions.

License

Notifications You must be signed in to change notification settings

danpasecinic/crabstash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crabstash

A high-performance embedded database written in Rust, featuring LSM-tree storage and MVCC transactions.

Features

  • LSM-tree storage engine - Write-optimized with background compaction
  • MVCC transactions - Snapshot and serializable isolation levels
  • Write-ahead logging - Durability guarantees with crash recovery
  • Bloom filters - Fast negative lookups
  • Embedded library - Link directly into your application

Quick Start

use crabstash::Db;

fn main() -> crabstash::Result<()> {
    let db = Db::open("my_data")?;

    db.put("hello", "world")?;

    if let Some(value) = db.get("hello")? {
        println!("{}", String::from_utf8_lossy(&value));
    }

    db.delete("hello")?;

    Ok(())
}

Transactions

use crabstash::{Db, Isolation};

fn main() -> crabstash::Result<()> {
    let db = Db::open("my_data")?;

    let txn = db.begin_with_isolation(Isolation::Serializable);
    txn.put("key1", "value1");
    txn.put("key2", "value2");
    txn.commit()?;

    Ok(())
}

Status

Work in progress.

License

MIT

About

A high-performance embedded database library written in Rust, featuring LSM-tree storage and MVCC transactions.

Topics

Resources

License

Stars

Watchers

Forks

Languages