NodeJS Mobile prebuilds for rocksdb-native
- Node 24 (see
.nvmrc) - Android NDK (CI uses version 27.2.12479018)
- (optional) exported
ANDROID_NDK_HOMEenvironment variable
- (optional) exported
- Xcode, for the iOS targets
Should be clear enough to follow the reusable workflow steps but in summary:
- Download the npm tarball package and unzip e.g.
npm pack rocksdb-native@latest | xargs tar -zxvf - Navigate to unzipped directory:
cd package - Install dependencies:
npm install --ignore-scripts - Install patched
cmake-napi:npm install cmake-napi@github:digidem/cmake-napi-nodejs-mobile - Install bare-make globally:
npm install -g bare-make@latest - Generate, build and install:
bare-make generate --platform android --arch arm64 bare-make build bare-make install
Note that step 6 is the short version. CI passes extra flags per platform that
matter for the artifacts actually shipping — a 16 KB max page size, an
android-24 target so the linker doesn't emit RELR relocations that Android <
9 can't load, the NDK's libc++ headers (bare-make leaves ANDROID_STL=none),
and APPLE_CLANG=ON on iOS. The prebuild
action
is the source of truth for these; each has a comment explaining why.
The first build clones librocksdb, libuv, and facebook/rocksdb from source, so expect it to take a while.
- Navigate to the Generate Prebuilds workflow
- Manually dispatch the worflow with the version you want to build, ensuring that "Publish Release" is checked.
We welcome contributions to this repository. If you have an idea for a new feature or have found a bug, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
rocksdb-native itself is licensed under Apache-2.0 by Holepunch; this repository only packages prebuilds of it.