A low-level Node.js RocksDB binding. An
Table of Contents
It is strongly recommended that you use
levelup in preference to
rocksdb unless you have measurable performance reasons to do so.
levelup is optimized for usability and safety. Although we are working to improve the safety of the
rocksdb interface it is still easy to crash your Node process if you don't do things in just the right way.
If you are upgrading: please see UPGRADING.md.
We aim to support at least Active LTS and Current Node.js releases, Electron 4.0.0, as well as any future Node.js and Electron releases thanks to N-API. Because N-API has an experimental status in node 6 and early 8.x releases, the minimum node version for
rocksdb npm package ships with prebuilt binaries for popular 64-bit platforms and is known to work on:
- Linux (including ARM platforms such as Raspberry Pi and Kindle)
- Mac OS
- Solaris (SmartOS & Nodejitsu)
If you don't want to use the prebuilt binary for the platform you are installing on, specify the
--build-from-source flag when you install. If you are working on
rocksdb itself and want to re-compile the C++ code it's enough to do
Please refer to
leveldown for API documentation. The
db.open(options, callback) method of
rocksdb has a few additional options:
false): open database in read-only mode.
null): verbosity of info log. One of
Level/rocksdb is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the Contribution Guide for more details.
- Increment the version:
npm version ..
- Push to GitHub:
git push --follow-tags
- Wait for Travis and AppVeyor builds to complete
- Download prebuilds into
npm run download-prebuilds
- Optionally verify loading a prebuild:
npm run test-prebuild
- Optionally verify which files npm will include:
- Add changelog to the GitHub release
rocksdb builds on the excellent work of the LevelDB and Snappy teams from Google and additional contributors to the LevelDB fork by Facebook. LevelDB and Snappy are both issued under the New BSD License. A large portion of
rocksdb Windows support comes from the Windows LevelDB port (archived) by Krzysztof Kowalczyk (
@kjk). If you're using
rocksdb on Windows, you should give him your thanks!