Skip to content

Rust rocksdb wrapper using serde and bincode for automatic serialization

License

Notifications You must be signed in to change notification settings

birktj/rocksbin-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rocksbin-db

Build Status Crates.io Documentation GitHub license

A simple rust rocksdb wrapper using serde and bincode for automatic serialization.

This library is perfect if what you want is a persistent HashMap stored on disk and a simple API.

extern crate rocksbin;

use rocksbin::DB;

let db = DB::open("db_dir").unwrap();

let fish_count = db.prefix::<String, u64>(b"fish_count").unwarp();

fish_count.insert("salmon", 10).unwarp();
fish_count.insert("cod", 100).unwarp();
fish_count.insert("mackerel", 70).unwarp();

assert_eq!(fish_count.get("salmon").unwarp(), Some(10));

About

Rust rocksdb wrapper using serde and bincode for automatic serialization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages