feat(npm): add Android arm64 (Termux) support - #695
Merged
Merged
Conversation
Adds @ff-labs/fff-bin-android-arm64 platform package and wires the existing aarch64-linux-android CI build into the npm publishing matrix. Extends getTriple() in fff-node and fff-bun to map process.platform 'android' to linux-android, and adds android to os arrays with the new optionalDependency. Closes #692.
dmtrKovalenko
approved these changes
Jul 20, 2026
abhijit-s
pushed a commit
to abhijit-s/fff
that referenced
this pull request
Jul 21, 2026
Upstream 0.10.1 batch (5 commits): pi-fff fixes (install fff-bun dmtrKovalenko#689/dmtrKovalenko#694, Windows cross-volume paths dmtrKovalenko#684), node/bun Android arm64 Termux support (dmtrKovalenko#695), and the 0.10.1 release/version bumps. No Rust source changes reach the fork — all JS-SDK/packaging/CI. Conflicts (config only, no code): - All crate Cargo.toml + workspace: take ours (fork stays 0.17.1; upstream's 0.10.1 is its own release line). fff-mcp keeps daemon deps (fff-ipc/dirs/libc). - install-mcp.sh: ours (fork installs from HEAD/source, not upstream release-pin). - release.yaml: ours — keep the Android C-FFI matrix entry commented, consistent with the fork's policy of disabling non-macOS C builds to keep CI lean. - Cargo.lock: ours (workspace unchanged vs f5db5c1). Daemon rust verified intact (server.rs proxy path present); build-daemon green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #692
Root cause
@ff-labs/fff-nodeand@ff-labs/fff-bundeclareos: [darwin, linux, win32], so npm rejects Android installs withEBADPLATFORM. Even withnpm_config_force=trueno binary resolves becauseTRIPLE_TO_NPM_PACKAGEhas noaarch64-linux-androidentry andgetTriple()throws onprocess.platform === 'android'. CI already cross-compilesaarch64-linux-android(.github/workflows/release.yaml:182-187,245-256) but the "Prepare npm package" and "Upload npm package artifact" steps were skipped, and no platform package existed.Fix
packages/fff-bin-android-arm64/withos: [android],cpu: [arm64].process.platform === 'android'→linux-androidingetTriple()for bothfff-nodeandfff-bun.aarch64-linux-android→@ff-labs/fff-bin-android-arm64inTRIPLE_TO_NPM_PACKAGE(both packages).androidtoosand the new package tooptionalDependenciesinfff-nodeandfff-bunpackage.json.npm_package: fff-bin-android-arm64on the android matrix leg and unskip the prepare/upload steps in.github/workflows/release.yamlso the existing NDK build gets published.Steps to reproduce
On Termux (Android arm64), on
mainbefore this fix:Workaround the reporter found (
npm_config_force=true pi install npm:@ff-labs/pi-fff) bypasses the platform check but leavesresolveFromNpmPackage()returningnull(packages/fff-node/src/binary.ts:68), so runtimedlopenstill fails outside a dev workspace.After this PR + first release cutting
@ff-labs/fff-bin-android-arm64, the same command should succeed without--force, andfindBinary()should return thelibfff_c.soinside the android platform package.How verified
npm run typecheckinpackages/fff-nodeandpackages/fff-bun— pass.npm run buildinpackages/fff-node— pass.target/aarch64-linux-android/ci/libfff_c.so; only packaging wiring changed.ldd/dlopenoflibfff_c.soagainst Bionic surfaces an unresolved symbol, we may need to adjustffi-rshandling (Termux uses@yuuang/ffi-rs-android-arm64@1.3.2which npm already selected in the reporter's log).Automated triage via Gustav. Honk-Honk 🪿