You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android (S0): make rune and rune-kit type-check for Android targets #2647
crates/rune/Cargo.toml:149: winit is built without an Android activity feature, so android-activity fails to compile (file not found for module activity_impl).
crates/rune/src/tooling/perf_warn/runq.rs:33: libc::getloadavg is compiled under cfg(unix); Android's bionic libc does not provide it.
Slice (4 files, +52 −2)
Enable android-native-activity on winit for Android targets only.
Return false from the overload probe (runq.rs) on Android.
Add .github/workflows/android.yml cross-checking aarch64-linux-android and x86_64-linux-android with embedded-fonts,accessibility,tooling,segmenter-dictionaries,svg,avif for rune and markdown,mermaid for rune-kit (on pushes to android/** and workflow_dispatch), plus a changelog fragment.
Checked
Fork CI workflow green for both aarch64-linux-android and x86_64-linux-android.
cargo check -p rune (Windows host) and cargo check-wasm pass.
Also verified merged onto current dev (3e46617e5) in android/next (03f8c0ff1: clippy on both Android targets, wasm, 488/0 doctests). No device involved.
both compile gaps on dev are real: crates/rune/Cargo.toml enables winit without an android activity feature (vendor/winit/Cargo.toml pulls android-activity 0.6 on target_os = "android", requiring android-native-activity or android-game-activity), and crates/rune/src/tooling/perf_warn/runq.rs calls libc::getloadavg under cfg(unix), which bionic does not provide. (checked by reading the code on dev; no android cross-check was run here.)
the runq.rs gate is straightforward, while the workflow and build-toolchain choices need a maintainer call:
ci triggers (.github/workflows/android.yml):anomalyco/rune lands directly on dev rather than android/** branches. .github/workflows/macos-tests.yml moved to a 6-hour schedule + workflow_dispatch because mac runners are scarce, whereas .github/workflows/check.yml runs on ubuntu-latest per push/pr. an ubuntu-hosted android cross-check fits either schedule + workflow_dispatch (or workflow_dispatch only until the host slices land) or a per-push/pr check once stable.
blake3, rav1d, and winit:rav1d is already behind the opt-in avif feature (crates/rune-image/Cargo.toml) and already documents nasm on x86 builds, so ci can either install nasm or omit avif from the android check. blake3 (Cargo.toml) is unconditional and needs ndk clang for neon/x86 simd unless blake3/pure is enabled on android (which drops simd hashing for image keys and shaders). enabling winit/android-native-activity also ties into Android (S1): native host (RuneView, lifecycle, insets, back) #2648's question on whether android keeps winit linked or cfgs it out.
questions for maintainers:
should an android cross-check workflow run on workflow_dispatch (+ schedule, like macos-tests.yml), on dev pushes/prs like check.yml, or wait until the host slices land?
should android builds require ndk clang (keeping blake3 simd) and nasm (when checking avif) in ci, or switch android to blake3/pure / omit avif — and is enabling winit/android-native-activity the intended s0 step alongside Android (S1): native host (RuneView, lifecycle, insets, back) #2648?
CI: android.yml runs on ubuntu-latest, about 2 minutes per target (cargo check of rune with the app features and of rune-kit), plus 4 minutes for the APK. It is cheap enough for dev pushes and PRs like check.yml; a per-push check is what catches the next getloadavg.
Toolchain: the fork keeps blake3's SIMD and avif. The runner's preinstalled NDK (ANDROID_NDK_LATEST_HOME) supplies clang, set through CC_<target>; nasm comes from apt. Nothing else is installed. winit/android-native-activity is the S0 step: it only makes winit build, the host in Android (S1): native host (RuneView, lifecycle, insets, back) #2648 never runs its activity glue.
winit Android feature: Enabled winit/android-native-activity under [target.'cfg(target_os = "android")'.dependencies] in crates/rune/Cargo.toml so android-activity compiles for S0 without pulling desktop Linux, X11, Wayland, arboard, or D-Bus crates onto Android.
Load-average probe: Gated libc::getloadavg in crates/rune/src/tooling/perf_warn/runq.rs behind #[cfg(all(unix, not(target_os = "android")))] and returned false on Android where bionic lacks getloadavg.
CI triggers & toolchain: Added .github/workflows/android.yml running on pushes to dev, pull requests, and workflow_dispatch on ubuntu-latest (matching check.yml). It keeps blake3 SIMD using the runner's preinstalled ANDROID_NDK_LATEST_HOME clang + llvm-ar for aarch64-linux-android and x86_64-linux-android, and checks rune with embedded-fonts,accessibility,tooling,segmenter-dictionaries,svg,avif plus rune-kit with markdown,mermaid. nasm is not needed because rav1d on dev uses pure Rust (default-features = false, no asm).
Verification
Verified locally (Windows host):
cargo tree -p rune -p rune-kit --target aarch64-linux-android -e normal confirmed 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 with default, --no-default-features, and full Android feature sets.
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.
Not verified locally: Full blake3 NEON C compilation with Android NDK clang on aarch64-linux-android, native Linux host build, or runtime execution on Android hardware/emulator (covered by GitHub Actions android.yml and check.yml on ubuntu-latest, where NDK clang discovery passed and the dev run is in progress).
Activity
opencodejr commentedon Nov 27, 2026
both compile gaps on
devare real:crates/rune/Cargo.tomlenableswinitwithout an android activity feature (vendor/winit/Cargo.tomlpullsandroid-activity0.6 ontarget_os = "android", requiringandroid-native-activityorandroid-game-activity), andcrates/rune/src/tooling/perf_warn/runq.rscallslibc::getloadavgundercfg(unix), which bionic does not provide. (checked by reading the code ondev; no android cross-check was run here.)the
runq.rsgate is straightforward, while the workflow and build-toolchain choices need a maintainer call:.github/workflows/android.yml):anomalyco/runelands directly ondevrather thanandroid/**branches..github/workflows/macos-tests.ymlmoved to a 6-hour schedule +workflow_dispatchbecause mac runners are scarce, whereas.github/workflows/check.ymlruns onubuntu-latestper push/pr. an ubuntu-hosted android cross-check fits eitherschedule+workflow_dispatch(orworkflow_dispatchonly until the host slices land) or a per-push/pr check once stable.blake3,rav1d, andwinit:rav1dis already behind the opt-inaviffeature (crates/rune-image/Cargo.toml) and already documentsnasmon x86 builds, so ci can either installnasmor omitaviffrom the android check.blake3(Cargo.toml) is unconditional and needs ndkclangfor neon/x86 simd unlessblake3/pureis enabled on android (which drops simd hashing for image keys and shaders). enablingwinit/android-native-activityalso ties into Android (S1): native host (RuneView, lifecycle, insets, back) #2648's question on whether android keepswinitlinked orcfgs it out.questions for maintainers:
workflow_dispatch(+ schedule, likemacos-tests.yml), ondevpushes/prs likecheck.yml, or wait until the host slices land?clang(keepingblake3simd) andnasm(when checkingavif) in ci, or switch android toblake3/pure/ omitavif— and is enablingwinit/android-native-activitythe intended s0 step alongside Android (S1): native host (RuneView, lifecycle, insets, back) #2648?pascalandr commentedon Nov 27, 2026
What the fork does, for the two calls:
android.ymlruns onubuntu-latest, about 2 minutes per target (cargo checkofrunewith the app features and ofrune-kit), plus 4 minutes for the APK. It is cheap enough fordevpushes and PRs likecheck.yml; a per-push check is what catches the nextgetloadavg.blake3's SIMD andavif. The runner's preinstalled NDK (ANDROID_NDK_LATEST_HOME) supplies clang, set throughCC_<target>;nasmcomes from apt. Nothing else is installed.winit/android-native-activityis the S0 step: it only makeswinitbuild, the host in Android (S1): native host (RuneView, lifecycle, insets, back) #2648 never runs its activity glue.Hona commentedon Nov 27, 2026
Merged in PR #2662 (
e662f2428).Design decisions
winitAndroid feature: Enabledwinit/android-native-activityunder[target.'cfg(target_os = "android")'.dependencies]incrates/rune/Cargo.tomlsoandroid-activitycompiles for S0 without pulling desktop Linux, X11, Wayland,arboard, or D-Bus crates onto Android.libc::getloadavgincrates/rune/src/tooling/perf_warn/runq.rsbehind#[cfg(all(unix, not(target_os = "android")))]and returnedfalseon Android where bionic lacksgetloadavg..github/workflows/android.ymlrunning on pushes todev, pull requests, andworkflow_dispatchonubuntu-latest(matchingcheck.yml). It keepsblake3SIMD using the runner's preinstalledANDROID_NDK_LATEST_HOMEclang +llvm-arforaarch64-linux-androidandx86_64-linux-android, and checksrunewithembedded-fonts,accessibility,tooling,segmenter-dictionaries,svg,avifplusrune-kitwithmarkdown,mermaid.nasmis not needed becauserav1dondevuses pure Rust (default-features = false, noasm).Verification
cargo tree -p rune -p rune-kit --target aarch64-linux-android -e normalconfirmed zero desktop-only crates (x11,wayland,arboard,zbus,accesskit_unix,rfd,spellbook).cargo check -p rune -p rune-kit --target x86_64-linux-androidpassed 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.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.blake3NEON C compilation with Android NDK clang onaarch64-linux-android, native Linux host build, or runtime execution on Android hardware/emulator (covered by GitHub Actionsandroid.ymlandcheck.ymlonubuntu-latest, where NDK clang discovery passed and thedevrun is in progress).Please reopen if anything is still off.
fix(android): enable rune and rune-kit to type-check for Android targ…
Merge upstream dev: its Android type-check replaces the fork's S0