Skip to content

dprkh/bitcask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust implementation of Bitcask.

https://riak.com/assets/bitcask-intro.pdf

use uuid::Uuid;

fn main() -> anyhow::Result<()> {
    let database = bitcask::open(
        "./my_database",
        bitcask::Options {
            max_file_size: 2 * 1024 * 1024 * 1024,
        },
    )?;

    let id = Uuid::now_v7();

    database.put(id, b"Hello, World!")?;

    let value = database.get(id).unwrap();

    println!("{}", str::from_utf8(&value)?);

    Ok(())
}

About

Rust implementation of Bitcask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages