All Projects → status-im → nim-rocksdb

status-im / nim-rocksdb

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHEv2 MIT LICENSE-MIT
Nim wrapper for RocksDB, a persistent key-value store for Flash and RAM Storage.

Programming Languages

nim
578 projects
c
50402 projects - #5 most used programming language

Nim-RocksDB

Build Status (Travis) Windows build status (Appveyor) License: Apache License: MIT Stability: experimental

A Nim wrapper for Facebook's RocksDB, a persistent key-value store for Flash and RAM Storage.

Current status

Nim-RocksDB currently provides a wrapper for the low-level functions of RocksDB

Requirements

A RocksDB installation that provides librocksdb.so. This means that on Debian, and possibly on other Linux distros, you need "librocksdb-dev", not just a versioned "librocksdbX.Y" package that only provides librocksdb.so.X.Y.Z.

Usage

See simple_example

Static linking

To statically link librocksdb, you would do something like:

nim c -d:LibrocksbStaticArgs='-l:librocksdb.a' --gcc.linkerexe=g++ --threads:on your_program.nim

(we need the C++ linker profile because it's a C++ library)

Future directions

In the future, Nim-RocksDB might provide a high-level API that:

  • is more in line with Nim conventions (types in CamelCase),
  • automatically checks for errors,
  • leverage Nim features like destructors for automatic resource cleanup.

Contribution

Any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

License

Wrapper License

This repository is licensed and distributed under either of

or

at your option. This file may not be copied, modified, or distributed except according to those terms.

Dependency License

RocksDB is developed and maintained by Facebook Database Engineering Team. It is built on earlier work on LevelDB by Sanjay Ghemawat ([email protected]) and Jeff Dean ([email protected])

RocksDB is dual-licensed under both the GPLv2 and Apache License, Version 2.0, (LICENSE-APACHEv2 or http://www.apache.org/licenses/LICENSE-2.0). You may select, at your option, one of the above-listed licenses.

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].