All Projects → bh1xuw → rust-rocks

bh1xuw / rust-rocks

Licence: Apache-2.0 license
Make RocksDB really rocks! The Rust style API.

Programming Languages

rust
11053 projects
C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to rust-rocks

pgrocks-fdw
Bring RocksDB to PostgreSQL as an extension. It is the first foreign data wrapper (FDW) that introduces LSM-tree into PostgreSQL. The underneath storage engine can be RocksDB. The FDW also serves for VidarDB engine, a versatile storage engine for various workloads. See the link for more info about VidarDB engine.
Stars: ✭ 101 (+146.34%)
Mutual labels:  rocksdb, lsm-tree
database-engine
LSM-Tree Key-Value Store based on RocksDB
Stars: ✭ 47 (+14.63%)
Mutual labels:  rocksdb, lsm-tree
rippledb
Embeddable key-value database engine in pure TypeScript, based on LSM-Tree
Stars: ✭ 33 (-19.51%)
Mutual labels:  rocksdb, lsm-tree
Tikv
Distributed transactional key-value database, originally created to complement TiDB
Stars: ✭ 10,403 (+25273.17%)
Mutual labels:  rocksdb
Srchx
A standalone lightweight full-text search engine built on top of blevesearch and Go with multiple storage (scorch, boltdb, leveldb, badger)
Stars: ✭ 118 (+187.8%)
Mutual labels:  rocksdb
Rocksdb Sharp
.net bindings for the rocksdb by facebook
Stars: ✭ 173 (+321.95%)
Mutual labels:  rocksdb
Tidis
Distributed transactional NoSQL database, Redis protocol compatible using tikv as backend
Stars: ✭ 1,182 (+2782.93%)
Mutual labels:  rocksdb
hub
No description or website provided.
Stars: ✭ 12 (-70.73%)
Mutual labels:  rocksdb
Kvs
💿 KVS: Abstract Chain Database
Stars: ✭ 160 (+290.24%)
Mutual labels:  rocksdb
Tendis
Tendis is a high-performance distributed storage system fully compatible with the Redis protocol.
Stars: ✭ 2,295 (+5497.56%)
Mutual labels:  rocksdb
docker-mongo
MongoDB Docker image embedding RocksDB storage engine
Stars: ✭ 32 (-21.95%)
Mutual labels:  rocksdb
Rocksdb
Pure C++ Node.js RocksDB binding. An abstract-leveldown compliant store.
Stars: ✭ 138 (+236.59%)
Mutual labels:  rocksdb
Rocksdb Doc Cn
中文版rocksdb文档
Stars: ✭ 118 (+187.8%)
Mutual labels:  rocksdb
Vasto
A distributed key-value store. On Disk. Able to grow or shrink without service interruption.
Stars: ✭ 206 (+402.44%)
Mutual labels:  rocksdb
Benchmarks
Benchmark of open source, embedded, memory-mapped, key-value stores available from Java (JMH)
Stars: ✭ 116 (+182.93%)
Mutual labels:  rocksdb
iota-python
A Pure-Python implementation of IOTA node
Stars: ✭ 30 (-26.83%)
Mutual labels:  rocksdb
Crux
General purpose bitemporal database for SQL, Datalog & graph queries
Stars: ✭ 1,296 (+3060.98%)
Mutual labels:  rocksdb
Ardb
A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
Stars: ✭ 1,707 (+4063.41%)
Mutual labels:  rocksdb
Sharkstore
distributed key - value persisted storage system
Stars: ✭ 165 (+302.44%)
Mutual labels:  rocksdb
qed
The scalable, auditable and high-performance tamper-evident log project
Stars: ✭ 87 (+112.2%)
Mutual labels:  lsm-tree

RustRocks

crates.io badge DOCS.RS badge Linux Build Status macOS Build Status Windows Build Status

Another RocksDB binding for Rust. Documentation

Make RocksDB really rocks!

  • Static link against RocksDB 6.7.3 (git submodules)
  • Dynamic link tested:
    • macOS homebrew
    • Windows 10, VS 2019 with vcpkg
    • ArchLinux pacman, both x86_64 and aarch64(ODroid-C2)
    • Ubuntu 18.04 (rocksdb5.8 branch), both x86_64 and aarch64(RPi 3)
    • Ubuntu 20.04 (rocksdb5.17 branch)

Installation

Dynamicly link RocksDB:

[dependencies]
rocks = "0.1"

Static link against RocksDB(with snappy enabled by default):

[dependencies.rocks]
version = "0.1"
default-features = false
features = ["static-link"]

With all static features(all compression types):

[dependencies.rocks]
version = "0.1"
default-features = false
features = ["full"]

How to compile

Feel free to refer Travic-CI, AppVeyor and Github Actions configuration files.

Static Link

$ git submodule update --init --recursive
$ cargo test --features static-link -- --test-threads 1
(This will build with snappy as the only compression supported)

$ cargo test --features full -- --test-threads 1
(This will build with all compression supported)

Dynamic Link

For macOS(with RocksDB installed via brew):

$ brew install rocksdb
$ cargo test -- --nocapture --test-threads 1

For Linux:

(install rocksdb via package manager or make & install)
$ sudo apt install lld
(NOTE: gcc-ld can't handle circular references while linking.)
(for more, refer the last section of README)
$ RUSTFLAGS="-C link-arg=-fuse-ld=lld" cargo test -- --test-threads 1

Use environment variables if rocksdb is installed to non-default directory:

LD_LIBRARY_PATH=/usr/local/lib LIBRARY_PATH=/usr/local/lib CXXFLAGS=-I/usr/local/include

Ubuntu LTS

RocksDB changes its API often, so rust-rocks use different branch to support Ubuntu LTS.

> sudo apt install librocksdb-dev libsnappy-dev

You also need lld form official source or http://apt.llvm.org/.

Branches:

  • rocksdb5.8 (18.04 LTS)
  • rocksdb5.17 (20.04 LTS)

Windows

You need VS 2017 or VS 2019, and install RocksDB via vcpkg.

FAQ

Feel free to Open a New Issue.

List current supported compression types

$ cargo run --example it-works
RocksDB: 6.7.3
Compression Supported:
  - NoCompression
  - SnappyCompression
  - ZlibCompression
  - BZip2Compression
  - LZ4Compression
  - LZ4HCCompression
  - ZSTD
  - ZSTDNotFinalCompression

Development

Bindgen:

$ cd rocks-sys
$ PATH="/usr/local/opt/llvm/bin:$PATH" make
(this will regenerate the bindgen c.rs)

Known bugs

Linking error under Linux

  • rust-rocks exports rust functions to c++, so there are circular references while linking
  • GCC requires that you put the object files and libraries in the order that they depend on each other
  • Rust will not wrap user crates in --start-group and --end-group
  • So circular references will be errors.
  • Can be fixed by using lld as linker, RUSTFLAGS="-C link-arg=-fuse-ld=lld"
  • Can be fixed by manually organising link arguments
    • librocks, then librocks_sys, then librocks again

Minor memory leaks

  • The raw pointers are created on the fly, should be impled via lazy_static and wrapped in trait objects
    • ColumnFamilyOptions::comparator: const Comparator*
    • ColumnFamilyOptions::compaction_filter: const CompactionFilter*

Iterator leaks lifetime

Ref: #15

  • While doing a for-traverse: That's OK
  • While collecting for later use: Clone the keys and values
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].