Skip to content

digidem/rocksdb-native-nodejs-mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rocksdb-native-nodejs-mobile

NodeJS Mobile prebuilds for rocksdb-native

Working locally

Requirements

  • Node 24 (see .nvmrc)
  • Android NDK (CI uses version 27.2.12479018)
    • (optional) exported ANDROID_NDK_HOME environment variable
  • Xcode, for the iOS targets

General steps

Should be clear enough to follow the reusable workflow steps but in summary:

  1. Download the npm tarball package and unzip e.g.
    npm pack rocksdb-native@latest | xargs tar -zxvf
    
  2. Navigate to unzipped directory:
    cd package
    
  3. Install dependencies:
    npm install --ignore-scripts
    
  4. Install patched cmake-napi:
    npm install cmake-napi@github:digidem/cmake-napi-nodejs-mobile
    
  5. Install bare-make globally:
    npm install -g bare-make@latest
    
  6. 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.

Creating a release

  1. Navigate to the Generate Prebuilds workflow
  2. Manually dispatch the worflow with the version you want to build, ensuring that "Publish Release" is checked.

Contributing

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.

License

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.

About

NodeJS Mobile prebuilds for rocksdb-native

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors