#database #embedded #LSM-tree #persistence

exonum_rocksdb

Rust wrapper for Facebook’s RocksDB embeddable database

5 releases

0.7.4 Jun 15, 2018
0.7.2 Jan 8, 2018
0.7.1 Nov 17, 2017
0.7.0 Oct 26, 2017
0.6.1 Sep 13, 2017

#71 in Database interfaces

Download history 197/week @ 2019-01-19 233/week @ 2019-01-26 111/week @ 2019-02-02 91/week @ 2019-02-09 135/week @ 2019-02-16 130/week @ 2019-02-23 126/week @ 2019-03-02 145/week @ 2019-03-09 141/week @ 2019-03-16 165/week @ 2019-03-23 166/week @ 2019-03-30 105/week @ 2019-04-06 160/week @ 2019-04-13 102/week @ 2019-04-20 66/week @ 2019-04-27

998 downloads per month
Used in 7 crates (1 directly)

Apache-2.0

170KB
3K SLoC

exonum_rocksdb

Build Status Build status crates.io

Documentation

Feedback and pull requests welcome! If a particular feature of RocksDB is important to you, please let me know by opening an issue, and I'll prioritize it.

[dependencies]
exonum_rocksdb = "0.7"

lib.rs:

Rust wrapper for RocksDB.

Examples

 extern crate tempdir;
 extern crate exonum_rocksdb;

 use exonum_rocksdb::DB;
 use tempdir::TempDir;
 // NB: db is automatically closed at end of lifetime
 # fn main() {
 let temp_dir = TempDir::new("storage").unwrap();
 let db = DB::open_default(temp_dir.path()).unwrap();
 let _ = db.put(b"my key", b"my value");
 match db.get(b"my key") {
    Ok(Some(value)) => println!("retrieved value {}", &value.to_utf8().unwrap()),
    Ok(None) => println!("value not found"),
    Err(e) => println!("operational problem encountered: {}", e),
 }
 db.delete(b"my key").unwrap();
 # }

Dependencies

~1MB
~17K SLoC