https://kotlinlang.org logo
l

Lucas

07/07/2023, 10:05 PM
Would it be possible to make compose support linux (and maybe other targets) natively, since it already supports darwin? Or is there still a lot of work to do?
Hmm it looks like Skiko only supports kotlin/jvm on linux, and only macos and ios on native
m

Michael Paus

07/08/2023, 8:42 AM
According to my experience, when I last tried it on macOS, there is indeed still a lot to do. On the other hand, what do expect to gain if it where available? You just loose all the libraries and other benefits that Java has to offer.
l

Landry Norris

07/08/2023, 2:17 PM
On the other hand, you gain cinterop with all of Linux's libraries without needing jni or jna. When I was in college (and had time), I would often write C and K/N programs that help manage my system at the low level. If I had access to Compose, I may have added a UI for these.
I'd imagine that once Compose/Native is stable, Linux may be prioritized, but I'd expect we're years away from Linux native support. Right now, it's in an early phase where large changes can happen, and it makes that harder if you have to make changes across 4 native targets instead of two. Native macos support also sometimes falls behind iOS because it's less of a focus (and should be right now).
m

Michael Paus

07/08/2023, 3:40 PM
If only Compose had seamless JNI-based cinterop so that you could directly use a shared library in Java AND native Compose 😇. Just wishful thinking 😢. (Of course I am only talking about one-way cinterop here, i.e., native calling into library.)
l

Lucas

07/08/2023, 6:18 PM
Well from the compose part it seems that some parts are still missing such as integration with a ui window for drawing skia(like XLIB), among some other things like locale and charset, but not really a lot of stuff Skiko on the other hand seems to lack a lot if not all of the linux implementation For what it would be gained, not really much, just thought it would be very cool I'm already trying to use as many multiplatform libraries as possible, so thats not reeeealy an issue The main benefit i guess would be not depending on jvm for deployment (i know it can be achieved with graalvm but thats still also not fully stable afaik, and also has some tradeoffs)
m

Michael Paus

07/08/2023, 6:34 PM
And what’s the problem with the JVM for deployment? When you create an installer via the built-in tooling a user of your software will hardly notice any difference to a native app. The effort and the disadvantages of going native are just not worth it at the moment.
l

Lucas

07/08/2023, 6:45 PM
Well there isnt really a problem i guess. I was just trying to experiment with compose for linux
4 Views