Skip to content

Towartz/nodejs-arm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Node.js for Android ARM

Build NDK API Node License Views

Cross-compiled libnode.so + node CLI for Android ARM64 / ARM32 via GitHub Actions.

Builds

Profile Flags Use Case Status
balanced JIT + -O3 Best runtime speed (default)
speed +LTO Faster execution, longer build
size +v8-lite-mode Lower RAM, slower JS/crypto
ABI Status
arm64-v8a ✅ Verified
armeabi-v7a ⚠️ Experimental (nodejs/node#58975)

Usage

Trigger a build via ActionsNode.js for Android (ARM)Run workflow.

Artifacts are downloaded as lib<name>-android-<abi>.tar.gz containing:

  • lib<name>.so — shared library (stripped, set-soname applied)
  • node — CLI binary (stripped)

Custom library name

Set lib_name to aurora → produces libaurora.so with automatic patchelf dependency rewrite on the CLI binary.

Build profiles

Select profile in workflow_dispatch:

  • balanced-O3, JIT enabled. Best for Baileys/server workloads.
  • speed — adds LTO. ~5-15% faster output, ~2x longer build.
  • size — enables V8 lite-mode. Lower peak RAM but 2-3x slower crypto/JS.

Minimum Android API: 24 (Android 7.0+). Required by Node.js v24+.

Toolchain

Component Version Notes
NDK r26d Clang 17 — last NDK without the turboshaft CRTP regression
Host ubuntu-22.04 Pinned for NDK toolchain ABI stability
Target API android-24 MinSdkVersion 24

NDK r27+ ships Clang 18+, which fails to compile V8's turboshaft AssemblerOpInterface<Next> : public Next CRTP pattern on v26.x. See deps/v8/src/compiler/turboshaft/assembler.h for the affected code.

Patches

This workflow applies community-maintained patches for Android cross-compilation. These are tracked upstream at:

Patches cover: V8 stack tracing, trap handler, zlib cpu_features, std::atomic_ref polyfill, uv.gyp toolset fix, FICLONE removal, SMI assertion relaxation, and turboshaft CRTP workaround.

Branches

Branch Node.js version NDK Status
main v26.x r26d Active development
build_ndkr27 v24.x LTS r27d Maintained (v24.x turboshaft unaffected)

License

MIT

About

Production-grade GitHub Actions CI/CD for cross-compiling Node.js (v24.x–v26.x) → Android ARM64/ARM32. Deploys NDK r26d toolchain, applies V8/libuv cross-build patches, and produces stripped libnode.so + node CLI. Three build profiles: balanced, LTO-optimized, V8-lite-mode. ARM64 verified; ARMv7 experimental.

Topics

Resources

License

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors