feat: Support Android (Termux)#12735
Conversation
|
@gtbuchanan is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Termux on Android devices ships a Linux-compatible userspace and can run the existing `linux-64` and `linux-arm64` native binaries unchanged.
|
Interesting. Do you have examples of other tools that have needed to make a similar change? |
|
If by "similar change" you mean deploying the same Linux package on both Linux and Android, then I do not have examples other than It looks like Turbo building against |
|
I'm meaning libraries having to specifically carve out Android into their support matrix. Are there PRs/code pointers/Issues popping up elsewhere on GitHub now that people are doing more development in Termux and Termux-like environments? |
|
To avoid dumping a huge list of data points on you, I limited the search to Rust libraries currently shipped via npm. I also included a list of recent requests for a few other popular tools (not necessarily Rust). Rust-via-npm projects that ship Android binaries todayShared-os-array pattern
Separate-android-package pattern
Recent open requestsTools without Android support whose issue trackers show ongoing demand.
Already supported by other channels
I actually found that another user added a Termux package for turbo (termux/termux-packages#28773). I didn't think to look there because I was trying to pin turbo at the project level, given that |
Restore `packageManager: pnpm@10.32.1` in package.json. Turbo's workspace resolution requires that field and errors with `Missing packageManager` without it — commit 6f773c7 should not have dropped it. Adding it back fixes that latent regression. Rather than mirror the pnpm pin between `mise.toml`'s `[tools]` and `packageManager`, enable mise's `idiomatic_version_file_enable_tools = ["pnpm"]` so mise reads the version straight from package.json's `packageManager`. One pin, two consumers (turbo and mise). The aqua backend still locks per-platform pnpm binaries in `mise.lock`; only the version source moved. AGENTS.md gains a `Why turbo isn't in mise.toml` section recording why we don't manage turbo through mise (mise's only backend is `npm:turbo`, no per-platform integrity in mise.lock, Vercel ships no GitHub Release binaries today — though vercel/turborepo#12735 is the live PR re-litigating that). CONTRIBUTING.md tells contributors that Node and prek live in `mise.toml` while pnpm lives in `packageManager`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
Termux on Android devices ships a Linux-compatible userspace and can run the existing
linux-arm64native binary unchanged. This change ships the Linux binaries on Android.Note: I wasn't sure how receptive to this change you would be since the issue was previously rejected in 2023, so I chose the approach that resulted in fewer updates rather than creating a separate Android package (see j178/prek#1979 and j178/prek#1982 for reference). Let me know what you think
Resolves: #5616
Testing Instructions
I'm not sure how to test the npm resolution bit effectively without actually publishing the package. That's what the unit test is intended to cover. The launcher update can be verified in Termux by:
pnpm install -g path/to/turbo.tgz --forceunset TURBO_BINARY_PATH(if set)turbo --version(this should print the version rather thanTurborepo does not presently support your platform)