-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare a Graal-based iOS AOT Compilation #1611
Comments
Atm, I do not have GraalVM installed. My experience with Graal was with a non-JME hello world sample on Linux but it was from long ago. One of the restrictions of GraalVM native-image on mobile is that at the moment it only supports 64bit phones. There are two Gradle plugins for using GraalVM native-image. https://github.com/graalvm/native-build-tools (Java) or https://github.com/gluonhq/gluonfx-gradle-plugin (Java/JavaFX) I guess the most complicated part is with writing the configuration files. For auto-generating configuration files for JNI, Reflection,... they have developed a tracing agent. (have not used). It runs the app in a regular JVM and detects the JNI, Reflection,... configuration at runtime. This might be feasible for a desktop app with LWJGL backend but I am not sure how we can run tracing agent with GLES backend on Mac to create the correct JNI configuration file for iOS! |
About 6 months ago, I invested quite a bit a time in trying to get jme graalvm images to build. I never was actually successful. Some of the LWJGL magic was causing is to explode. Iirc I may have a slightly older forum post about it. If someone can get it working even for a desktop build of jme I would love to know. |
There is a Graal VM example using LibGdx + LWJGL which might worth looking. Also, note that for iOS we do not require LWJGL. |
By the way, there is also RoboVM https://github.com/MobiVM/robovm Edit: |
Hi guys! I got some spare time and managed to get a simple jme3.6.1 app to compile and run successfully with graalvm's native image. I've uploaded the sample to github so you can have a look: https://github.com/joliver82/jme3-graalvm-sample-project Although this is a good first step forward, iOS compatibility will require a lot more work to be done, at least:
Once these tasks are accomplished I think we should be able to have a graalvm ios build and run it on a device. I'm not sure what will happen regarding touch input, device rotation and maybe other stuff. Previously it was managed in https://github.com/jMonkeyEngine/sdk/blob/v3.2/jme3-ios/ios-data/templates/project/jme-ios/jmeAppDelegate.m getting the events from native and sending them to the jme harness |
That's encouraging. |
Due to the sunset of bintray, the SDK cannot easily access the avian build anymore, that I manually did painfully on a Mac OS X machine and stored it on bintray.
Now while I could try to get this running on Github Actions, it's still discontinued and based on java 7.
Instead Graal provides an industry grade support for general AOT compilation and should be supported for a much longer time.
The scope of this issue is to determine the steps required to get a working iOS Build and potentially yield further issues to implement engine-side improvements for that.
I guess @Ali-RS already had Graal Native image running?
Edit: Potentially even running some example in Github Actions to verify all the issues from https://hub.jmonkeyengine.org/t/native-compilation-graalvm-native-image/43820/ don't arise
The text was updated successfully, but these errors were encountered: