npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nxtedition/rocksdb

v12.1.4

Published

A low-level Node.js RocksDB binding

Downloads

1,661

Readme

rocksdb

A low-level Node.js RocksDB binding. An abstract-leveldown compliant store.

level badge npm Node version Test Coverage Standard Common Changelog Donate

Table of Contents

Introduction

This module closely follows leveldown and implements the same API. The difference is that leveldown is a binding for LevelDB while rocksdb is a binding for RocksDB, Facebook's fork of LevelDB.

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.

Supported Platforms

We aim to support at least Active LTS and Current Node.js releases, Electron 5.0.0, as well as any future Node.js and Electron releases thanks to N-API. The minimum node version for rocksdb is 10.12.0.

The 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)
  • FreeBSD
  • Windows

When installing rocksdb, node-gyp-build will check if a compatible binary exists and fallback to a compile step if it doesn't. In that case you'll need a valid node-gyp installation.

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 npm install.

API

Please refer to leveldown for API documentation. The db.open(options, callback) method of rocksdb has a few additional options:

  • readOnly (boolean, default false): open database in read-only mode.
  • infoLogLevel (string, default null): verbosity of info log. One of 'debug', 'info', 'warn', 'error', 'fatal', 'header' or null (disable).

Contributing

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.

Git Submodules

This project uses Git Submodules. This means that you should clone it recursively if you're planning on working on it:

$ git clone --recurse-submodules https://github.com/Level/rocksdb.git

Alternatively, you can initialize submodules after cloning:

$ git submodule update --init --recursive

Publishing

  1. Increment the version: npm version ..
  2. Push to GitHub: git push --follow-tags
  3. Wait for CI to complete
  4. Download prebuilds into ./prebuilds: npm run download-prebuilds
  5. Optionally verify loading a prebuild: npm run test-prebuild
  6. Optionally verify which files npm will include: canadian-pub
  7. Finally: npm publish

Donate

Support us with a monthly donation on Open Collective and help us continue our work.

License

MIT

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!