Repository navigation
fix(android): make rune and rune-kit type-check for Android targets - #2662
Merged
Merged
Conversation
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
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).
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.
Summary
Fixes the two Android compile gaps on
devsoruneandrune-kitcleanly type-check foraarch64-linux-androidandx86_64-linux-android, and adds a CI cross-check workflow to keep Android builds green.crates/rune/Cargo.toml: Enablewinit/android-native-activityunder[target.'cfg(target_os = "android")'.dependencies]soandroid-activitycompiles without pulling desktop Linux, X11, Wayland,arboard, or D-Bus dependencies onto Android.crates/rune/src/tooling/perf_warn/runq.rs: Gate thelibc::getloadavgprobe behind#[cfg(all(unix, not(target_os = "android")))]and returnfalseon Android, where bionic libc does not providegetloadavg..github/workflows/android.yml: Cross-checkrune(embedded-fonts,accessibility,tooling,segmenter-dictionaries,svg,avif) andrune-kit(markdown,mermaid) foraarch64-linux-androidandx86_64-linux-androidon pushes todev, pull requests, andworkflow_dispatch, using the runner's preinstalledANDROID_NDK_LATEST_HOMEclang +llvm-arsoblake3keeps SIMD (and withoutnasm, sincerav1dondevuses pure Rust withoutasm).Verification
cargo tree -p rune -p rune-kit --target aarch64-linux-android -e normalverified zero desktop-only crates (x11,wayland,arboard,zbus,accesskit_unix,rfd,spellbook).cargo check -p rune -p rune-kit --target x86_64-linux-androidpassed 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 (fullblake3NEON C compilation verified by theandroidCI workflow using NDK clang).cargo check -p rune -p rune-kit --features rune-kit/markdown,rune-kit/mermaid,cargo check-wasm, andcargo test -p rune --lib tooling::perf_warn::runq(6/6) passed on Windows host.Fixes #2647