Search code examples
javaarmarmv7graalvmgraalvm-native-image

GraalVM native-image of Quarkus app run on ARMv7 (32bit) device (IoT)


Is it possible to run GraalVM native-image of Quarkus framework app on ARMv7 (32bit) device? I know that GraalVM doesn't support 32bit environment but I wonder if there is some way to run binary with compiled GraalVM native-image on such. Is there some way to configure LLVM, used by GraalVM to achieve that? IoT device we preparing has to have some web application (accessed locally) with simple dashboard. Since device storage is too small to install any Java JDK >= 8, I wonder if GraalVM native-image would do the work.


Solution

  • It seems that you cannot compile/run GraalVM native-image on 32bit machines. If you want to develop simple web app for local IoT device with limited specs you have two options:

    1. Create custom JDK image using jlink (available since JDK 9). You can shrink JDK9 to 50MB size. Bear in mind there's no ARMv7 (32bit) version of JDK 9 (I haven't found any), but of course you can do the same with JDK 11 for ARM 32bit arch.
    2. Write your program in Golang using some lightweight web framework like Gin. GC collector embedded in compiled binary takes only ~1.9MB (they constantly try to make it even smaller). Golang is great language and it's fast.