Build the Rust CLI and the NAPI addon for aarch64-linux-android and x86_64-linux-android and publish them as `@pnpm/exe.android-*` and `@pnpm/napi.android-*`, so installing pnpm in Termux resolves a native binary instead of failing the preinstall with no prebuilt binary for the platform. Closes pnpm/pnpm#14431. pnpm 11 reached Android because it was a JavaScript CLI and bionic was irrelevant to it. pnpm 12 ships per-platform native binaries, which turned that into a hard install failure. This ships a dedicated artifact rather than aliasing the existing musl one onto android. Aliasing would mean dropping `libc: ["musl"]` from the shared packages and weakening that metadata for Alpine consumers, and it does not work anyway: the musl binary's `getaddrinfo` reads `/etc/resolv.conf`, which Android does not have and which cannot be created without root, so every registry lookup fails there. A bionic binary resolves through Android's own resolver. The generated manifests carry `os: ["android"]` with no `libc` field, since bionic is neither of the two the field can name. Cross.toml pins newer images for the two targets. The ones cross picks by default carry NDK r21, whose toolchain predates Rust's move from libgcc to libunwind, so linking fails with `cannot find -lunwind`. They are pinned by digest rather than tag because they build published, attested binaries. Android has no CI behind it: nothing in the release pipeline or the test suite runs on a device or an emulator, so this is best-effort. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
17 lines
848 B
TOML
17 lines
848 B
TOML
# Image overrides for `cross`. Every other release target builds in the image
|
|
# `cross` picks by default, so only the exceptions belong here.
|
|
#
|
|
# The default Android images carry NDK r21, whose toolchain predates Rust's
|
|
# move from libgcc to libunwind, so linking any binary fails with
|
|
# `cannot find -lunwind`. The images below carry NDK r25b and link.
|
|
#
|
|
# Pinned by digest rather than tag: these build the published, attested release
|
|
# binaries, and `:main` is a moving target. Re-pin deliberately, the way the
|
|
# workflows pin their actions.
|
|
|
|
[target.aarch64-linux-android]
|
|
image = "ghcr.io/cross-rs/aarch64-linux-android@sha256:85d58ad7dd4cc97903bff4c5e861a2c980d79248bc9c842791b99f1eef2d0f3b"
|
|
|
|
[target.x86_64-linux-android]
|
|
image = "ghcr.io/cross-rs/x86_64-linux-android@sha256:e60e4a759b4f07ac5d6f7632afc728d2a6a3ad668013ec17d9627b537acf2cdc"
|