https://kotlinlang.org logo
Title
s

SrSouza

11/05/2020, 12:27 PM
I don't know much about GraalVM, I know that it generates a native executable of a Java/Kotlin project. There is any possibility of using the GraalVM AOT compiler with Compose-JB ?
a

altavir

11/05/2020, 12:34 PM
Why would you need it if Native support will come sooner or later?
m

mbonnin

11/05/2020, 12:36 PM
To ship before Native support is there?
I've done a few tests with GraalVM and it's useful to distribute a JVM app without having to worry about bundling a JVM
1
Also starts faster
it’s not using Graal atm, but relies upon jpackage utility, however plugging Graal in looks natural
s

snrostov

11/05/2020, 12:41 PM
Compose Desktop is plain JVM application, so it should work just like all other JVM apps. Unfortunately, Graal doesn’t support AWT and Compose for Desktop uses it under the hood. So, it will not working (at least yet).
m

mbonnin

11/05/2020, 12:44 PM
GraalVM issue if anyones curious about AWT support: https://github.com/oracle/graal/issues/1327
👆🏻 1
s

snrostov

11/05/2020, 12:45 PM
BTW, it is possible to implement our own windows management API for all platforms without relying on AWT. It will work in that case, but it is huge work.
m

mbonnin

11/05/2020, 12:47 PM
Could SDL be an alternative to Swing/AWT?
s

snrostov

11/05/2020, 12:49 PM
AFAIK, it is only about graphics and input devices, but not windows management (menu, tray integration, notification, etc..). No?
m

mbonnin

11/05/2020, 12:49 PM
Oh yea
s

snrostov

11/05/2020, 12:49 PM
Skia have something in their demos, but it is not intended to be stable api. I think it is good point to start.
m

mbonnin

11/05/2020, 12:50 PM
I didn't know compose integrated with menus, tray, etc.. already 👏
m

mbonnin

11/05/2020, 12:51 PM
Awesome 😃
o

olonho

11/05/2020, 12:51 PM
see https://github.com/JetBrains/compose-jb/tree/master/tutorials for all tutorials for CfD specific features
👍 2
m

mbonnin

11/05/2020, 12:54 PM
Wow, that's some nice tutorials! 🤩 Congrats to the team!
s

snrostov

11/05/2020, 1:03 PM
JFR: Here is Skia window management utility which, apparently, can be improved to a stable state https://github.com/google/skia/blob/ed65339084c0da4b9711457e7d4747c9e072ca1e/tools/sk_app/Window.h