#persistence #lsm-tree #embedded

rocksdb2

Rust wrapper for Facebook's RocksDB embeddable database, added Windows support

1 unstable release

Uses old Rust 2015

0.1.0 Sep 20, 2017

#32 in #lsm-tree

Apache-2.0

105KB
1.5K SLoC

rust-rocksdb

Build Status Build status

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]
rocksdb = "0.6.0"

This binding is statically linked with a specific version of RocksDB. If you want to build it yourself, make sure you've also cloned the RocksDB and Snappy submodules:

git submodule update --init --recursive

lib.rs:

Rust wrapper for RocksDB.

Examples

 use rocksdb::DB;
 // NB: db is automatically closed at end of lifetime
 let db = DB::open_default("path/for/rocksdb/storage").unwrap();
 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

~23MB
~475K SLoC