Closed megatux closed 2 years ago
Sorry, I was getting hit by many trolls during the period when you created this issue, and I thought you were a troll too, so I closed it immediately.
Regardless of whether you were a troll or not though, it is OK to answer your questions today.
Glimmer DSL for SWT already generates native binaries using jpackage for Mac, Windows, and Linux.
However, if you mean native AOT (Ahead-of-time) compilation binaries, then perhaps Truffle Ruby and GraalVM could help with that. I have not tried them yet, but I am finally ready to give them a try, so I am reopening this issue.
SWT is definitely actively developed as you can see from the Glimmer DSL for SWT README, which always lists the latest version of the SWT library used (currently, SWT 4.22, which was released on November 24, 2021).
Also, SWT automatically uses GTK3.x on Linux, so you don't have to do anything. Just install Java (like standard openjdk-17 on Linux) and JRuby (like using RVM), and you're good to go! That said, if you only want to build GTK applications for Linux and do not care about native look and feel on Mac and Windows, then you can use Glimmer DSL for GTK instead, albeit it is a very new alpha library still that is not fully developed (whereas Glimmer DSL for SWT became a final and complete release long time ago, with new features added every once in a while)
According to the research I just did, TruffleRuby is not compatible with JRuby. Worse yet, its Graal Native Image does not really do AOT (ahead-of-time) compilation to the Ruby code itself, yet only to the Graal+Truffle implementation code: https://github.com/oracle/truffleruby/blob/67ee8b015d729749591ceff8b77037eb606bf3df/doc/contributor/native-image.md
As such, my initial gut feeling was right for avoiding TruffleRuby, and I do not see value in supporting it for the time being, especially given that Glimmer DSL for SWT already supports native executable packaging on Mac, Windows, and Linux.
Do you think it is possible to use Truffle Ruby to generate native binaries? Also, is SWT actively developed? Does it works with latest GTK3.x?