Repository navigation
GraalVM native images and ART as runtimes, besides jdk-mobile's JVM - #3
Merged
Merged
Conversation
…dk-mobile's JVM Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
This was referenced Oct 17, 2026
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
What runs the façades becomes a choice, per platform:
nucleusJvm { runtime / iosRuntime / androidRuntime }, withNjaRuntimeType.JVM(default, unchanged)GRAALVMARTJVM)njaGraalvmMobile<Target>: the kit, from graalvm-mobile's latest release (graalvmMobileRelease,graalvmMobileRepository). It reuses the jdk-mobile download task, now generic over the release's product.njaGraalvm<Target>: GraalVM CE for the build host, cached in~/.gradle/caches/nja/graalvm.njaNativeImage<Target>: compiles the façades into a relocatable object.libnja.sois the object plus the kit's libraries plusnja_android_graal.c.jvmOptions'-Xmxbecomes-R:MaxHeapSize, and-Doptions are kept.nativeImageOptionsis passed to native-image as is.GraalLinkadds the image's@CEntryPoints (nja_graal_dispatch,nja_graal_set_upcall).dlsym, so the same client links with either Zero or an image.AndroidJvmstarts the image when the app shipsnja/native-image.nja-serverbecome the Android app's own dependencies.NjaServer.handlein process, by reflection, with consumer keep rules.minSdkdrops to 21. HotSpot and native images still need Android 10.NjaServerand the torture façade no longer callRuntime.version(), which ART lacks.test-graalvm-android.ymlbuilds the example inGRAALVMmode on Linux and runs its suites on an x86_64 emulator.Verification
GRAALVM: 2008/2008 ("Substrate VM 25.0.4.1.1, iOS/arm64").ART: 2008/2008.JVM: 2008/2008.jvmTest: passes.graalvm-mobile-25.4.4.1.1b1.1.GRAALVMvsJVM:GRAALVM: on par with the former Lucene-on-ART build.JVM(HotSpot) is faster once warm, at 2.1 s cold and 559 MB.GRAALVMsuites on Android. That's the new workflow's job: the Android image was built on Linux in CI and the app benchmarked on an emulator, not the example's suites.