Skip to content

fix(android): make rune and rune-kit type-check for Android targets - #2662

Merged
Hona merged 1 commit into
devfrom
fix/android-s0-build
Nov 27, 2026
Merged

Hona merged 1 commit into
devfrom
fix/android-s0-build

Conversation

@Hona

@Hona Hona commented Nov 27, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the two Android compile gaps on dev so rune and rune-kit cleanly type-check for aarch64-linux-android and x86_64-linux-android, and adds a CI cross-check workflow to keep Android builds green.

  • crates/rune/Cargo.toml: Enable winit/android-native-activity under [target.'cfg(target_os = "android")'.dependencies] so android-activity compiles without pulling desktop Linux, X11, Wayland, arboard, or D-Bus dependencies onto Android.
  • crates/rune/src/tooling/perf_warn/runq.rs: Gate the libc::getloadavg probe behind #[cfg(all(unix, not(target_os = "android")))] and return false on Android, where bionic libc does not provide getloadavg.
  • .github/workflows/android.yml: Cross-check rune (embedded-fonts,accessibility,tooling,segmenter-dictionaries,svg,avif) and rune-kit (markdown,mermaid) for aarch64-linux-android and x86_64-linux-android on pushes to dev, pull requests, and workflow_dispatch, using the runner's preinstalled ANDROID_NDK_LATEST_HOME clang + llvm-ar so blake3 keeps SIMD (and without nasm, since rav1d on dev uses pure Rust without asm).

Verification

  • cargo tree -p rune -p rune-kit --target aarch64-linux-android -e normal verified zero desktop-only crates (x11, wayland, arboard, zbus, accesskit_unix, rfd, spellbook).
  • cargo check -p rune -p rune-kit --target x86_64-linux-android passed locally with default, --no-default-features, and full Android feature sets.
  • cargo check -p rune -p rune-kit --target aarch64-linux-android --features blake3/no_neon,... passed locally (full blake3 NEON C compilation verified by the android CI workflow using NDK clang).
  • cargo check -p rune -p rune-kit --features rune-kit/markdown,rune-kit/mermaid, cargo check-wasm, and cargo test -p rune --lib tooling::perf_warn::runq (6/6) passed on Windows host.

Fixes #2647

Select `winit/android-native-activity` under `target_os = "android"` so
`android-activity` compiles, return `false` from `perf_warn::runq::overloaded`
on Android where bionic libc lacks `getloadavg`, and add an Android cross-check
GitHub Actions workflow for `aarch64-linux-android` and `x86_64-linux-android`.

Fixes #2647
@Hona
Hona merged commit e662f24 into dev Nov 27, 2026
4 checks passed
@Hona
Hona deleted the fix/android-s0-build branch November 27, 2026 22:19
pascalandr added a commit to NeuralNomadsAI/rune that referenced this pull request Nov 27, 2026
Upstream merged the first Android slice (anomalyco#2662, closing anomalyco#2647): the winit
activity feature, the getloadavg gate and an android workflow. Taken from
upstream: runq.rs, the Android target section of rune's Cargo.toml (the
fork's JNI, NDK and AccessKit dependencies now sit in it), android.yml and
the changelog entry; the fork's own S0 entry goes.

Also from upstream since the last merge:
- Cx::touch_controls and hover_none read the host's primary pointer
  (anomalyco#2638). The fork's cfg(android) constants go; the Android LayerHost
  calls set_touch_controls(true), as the iOS one does.
- rune-text's prewarm_system_fonts (anomalyco#2660): Android's backend answers it
  with nothing to build ahead.
- rav1d without assembly (anomalyco#2641): an x86_64 library with avif links
  without -Wl,-Bsymbolic, so ANDROID.md's note about it goes.

Kept over upstream in android.yml: the android/** push trigger and the apk
job, which builds the Kotlin host with the example.

Checked: clippy for both Android targets (let_underscore_must_use allowed,
as rune-core fails it upstream), an x86_64 cdylib with avif links,
check-wasm, cargo check, file-size, rune lib tests 4087 passed with the 4
failures upstream dev has on Windows (and one more that passes alone).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android (S0): make rune and rune-kit type-check for Android targets

1 participant