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
Building for arm-linux-androideabi (Android 32-bit ARM) is blocked by a hard limitation in the wasmtime dependency.
Root cause
larql-inference depends unconditionally on wasmtime with the cranelift feature:
# crates/larql-inference/Cargo.tomlwasmtime = { version = "29", default-features = false, features = ["cranelift", "runtime"] }
Cranelift (wasmtime's JIT compiler backend) has no 32-bit ARM backend. The build fails immediately at the cranelift-codegen build script:
error: failed to run custom build command for `cranelift-codegen v0.116.1`
thread 'main' panicked: error when identifying target: "no supported isa found for arch `arm`"
Cranelift supports: x86_64, aarch64, s390x, riscv64. It does not and has no plans to support arm (32-bit).
Required prerequisite (any path)
wasmtime must be made optional in larql-inference and excluded on 32-bit ARM. model-compute already does this with its wasm feature flag — the pattern exists:
All call sites in larql-inference that use wasmtime would then need #[cfg(feature = "wasm-experts")] guards, with the WASM expert registry path degrading gracefully on unsupported targets.
Alternative runtime paths
Option A — wasmi (pure-Rust interpreter)
wasmi is a fully interpreted WASM runtime with zero native-code generation — no Cranelift, no LLVM dependency
Works on any architecture Rust targets, including arm-linux-androideabi
Drop-in at the API level for the WASM expert registry use case
Trade-off: slower execution (interpreted vs JIT), but for the expert dispatch path this may be acceptable
Lowest complexity path to unblock the 32-bit Android build
Option B — wasmer + LLVM backend
Wasmer supports multiple backends; its LLVM backend uses LLVM for code generation, and LLVM does have an ARMv7 target
More complex: requires LLVM to be available and cross-compilable to arm-linux-androideabi
More informative for the attention mechanism decomposition work in larql-inference — the LLVM IR for WASM expert modules exposes the full lowering of attention kernels, which can surface optimisation opportunities and structural problems not visible through Cranelift's opaque ISel
Higher setup cost, but produces richer diagnostic output for mechanistic interpretability tooling
Recommendation
Start with Option A (wasmi) to unblock the build, keeping the WASM expert feature behind a flag. Option B (wasmer+LLVM) is a worthwhile follow-on if the attention decomposition analysis requires finer-grained IR visibility into expert execution.
Summary
Building for
arm-linux-androideabi(Android 32-bit ARM) is blocked by a hard limitation in thewasmtimedependency.Root cause
larql-inferencedepends unconditionally onwasmtimewith thecraneliftfeature:Cranelift (wasmtime's JIT compiler backend) has no 32-bit ARM backend. The build fails immediately at the
cranelift-codegenbuild script:Cranelift supports:
x86_64,aarch64,s390x,riscv64. It does not and has no plans to supportarm(32-bit).Required prerequisite (any path)
wasmtimemust be made optional inlarql-inferenceand excluded on 32-bit ARM.model-computealready does this with itswasmfeature flag — the pattern exists:All call sites in
larql-inferencethat usewasmtimewould then need#[cfg(feature = "wasm-experts")]guards, with the WASM expert registry path degrading gracefully on unsupported targets.Alternative runtime paths
Option A —
wasmi(pure-Rust interpreter)wasmiis a fully interpreted WASM runtime with zero native-code generation — no Cranelift, no LLVM dependencyarm-linux-androideabiOption B —
wasmer+ LLVM backendarm-linux-androideabilarql-inference— the LLVM IR for WASM expert modules exposes the full lowering of attention kernels, which can surface optimisation opportunities and structural problems not visible through Cranelift's opaque ISelRecommendation
Start with Option A (wasmi) to unblock the build, keeping the WASM expert feature behind a flag. Option B (wasmer+LLVM) is a worthwhile follow-on if the attention decomposition analysis requires finer-grained IR visibility into expert execution.
Context
aarch64-linux-androidbuilds successfully (PR feat(android): enable aarch64-linux-android cross-compilation #94)