Hey guys! As I understood, it's not possible to ru...
# compose
l
Hey guys! As I understood, it's not possible to run Jetpack Compose on ARM64 devices yet as it's not a supported platform. Does this stands? I couldn't find any recent threads about it
s
Jetpack Compose(Android) is written in Kotlin, does not use the NDK(C/C++), and compiles to Android DEX bytecode, which is architecture-independent. What is your statement based on? ARM64 is the majority architecture of Android devices nowadays, so it would be very strange if it didn’t work there. 😀
p
I think it still stands. To be able to run a compose App as a standalone binary let's say in a Linux computer with ARM-64 architecture. I think there is no demand for it.
And compose needs a few platform wrappers
l
Specifically I wanted to run on a Raspberry PI, which is a Linux ARM64 mostly
y
Linux (x86-64, arm64)
👍 1
s
Jetpack Compose is different from Compose Multiplatform. Jetpack Compose is an Android-only library. If the author was asking about Compose Multiplatform, yes, there are some limitations due to the use of Skiko, which does not compile to some targets.
p
But I think those still requires the JVM, Yuri
👍🏻 1
s
Compose on desktop platforms requires the JVM, and I believe JetBrains doesn’t have plans to change that.
y
I thought raspberry pi does support the JVM
s
it does
y
Is it graphics missing?
l
Requiring the JVM is a much lesser problem than requiring an incompatible platform
JVM runs on 8 BILLION DEVICES
Would I have to compile differently? Or could I try to compile it and see what happens?
s
Are you compiling on RPI? Because the toolchain does not support cross-compilation. Correct me if I’m wrong.
l
I'm compiling on ubuntu and transfering to rpi. But I didn't try it yet, wanted to understand the architecture first
s
The documentation says that Linux arm64 is supported.
l
Gradle din't like it
Copy code
implementation(compose.desktop.currentOs)
this line fails
Wait, I tested against arm, not arm64
r
Compose for Desktop is a JVM target, it should run fine on arm64? macOS devices are arm64 after all and Compose for Desktop works just fine there.
1
j
Skiko would be the limiting factor here, as it's the only component of the Compose UI for Desktop JVM stack that has actual native code. And Linux ARM is indeed available per its readme: https://github.com/JetBrains/skiko#readme
u
Personally, I tried launching a Compose Desktop project on a Linux Arm, it works but I couldn't package it.
j
You can jlink a minimal JRE from another OS, but my understanding is jpackage has to be run on the destination OS. GitHub has Linux ARM runners now, though, so you could use those.