GraalVM and OpenXION 'Native' building
Posted: Sat Dec 16, 2023 3:18 pm
As discussed elsewhere in this forum, (in one of many threads that go off into different topics in wildly different directions)
I built a macOS X86-64bit 'native' build of OpenXION. OpenXION is a real nice xTalk interpreter written in JAVA that was built as a reference implementation for the XION xtalk dialect. In most basic syntax its xTalk interpreter is very true to HyperCard's interpreter, but also has additional syntax well beyond HyperTalk like OOP related syntax (which may be very handy) and is a bit more cross-platform polyglot-friendly. The biggest problem with it is that it's a 'terminal' style CLI, even answer/ask answer file, answer folder, etc. but those can be overridden and replaced with Graphical Dialogs fairly easily (see the OXT OpenXION repo for Mac/AppleScript based GUI Ask/Answer dialogs).
Since people have expressed some interest in also having Win, Linux, ARM, AppleSilicon, etc. builds of OpenXION, and I may not have time, and I definitely don't have the hardware to build these 'native' builds of it... and because I've basically forgotten the steps I used to build it, I thought I'd post this nice article, it's probably what I read that prompted me to do it when I built the Mac X86-64 build.
https://medium.com/graalvm/cli-applicat ... 29a40aa0be
This one goes into finer detail:
https://medium.com/graalvm/working-with ... 12ccdcd61b
As far as I remember the steps boiled down to:
Install GraalVM and run some commands to make sure you're using GraalVM as your JVM,
Then install natifier, run another command that points it to the OpenXION distribution .java files,
And viola, spits out a self contained 'native' executable, the JVM thereafter is no longer required
in order to run that executable on whatever platform you built the binary for.
Looking at GraalVM's site, and some of the API documentation, it seems that the VM supports Linux, Mac, Windows + IOS/ANDROID, on Intel/ARM/AppleSilicon/RISC processors, so anything that Oracle supports I guess:
• Platform.AARCH64
• Platform.AMD64
• Platform.ANDROID
• Platform.ANDROID_AARCH64
• Platform.DARWIN
• Platform.DARWIN_AARCH64
• Platform.DARWIN_AMD64
• Platform.HOSTED_ONLY
• Platform.IOS
• Platform.IOS_AARCH64
• Platform.IOS_AMD64
• Platform.LINUX
• Platform.LINUX_AARCH64
• Platform.LINUX_AARCH64_BASE
• Platform.LINUX_AMD64
• Platform.LINUX_AMD64_BASE
• Platform.LINUX_RISCV64
• Platform.MACOS
• Platform.MACOS_AARCH64
• Platform.MACOS_AMD64
• Platform.RISCV64
• Platform.WINDOWS
• Platform.WINDOWS_AARCH64
• Platform.WINDOWS_AMD64
I built a macOS X86-64bit 'native' build of OpenXION. OpenXION is a real nice xTalk interpreter written in JAVA that was built as a reference implementation for the XION xtalk dialect. In most basic syntax its xTalk interpreter is very true to HyperCard's interpreter, but also has additional syntax well beyond HyperTalk like OOP related syntax (which may be very handy) and is a bit more cross-platform polyglot-friendly. The biggest problem with it is that it's a 'terminal' style CLI, even answer/ask answer file, answer folder, etc. but those can be overridden and replaced with Graphical Dialogs fairly easily (see the OXT OpenXION repo for Mac/AppleScript based GUI Ask/Answer dialogs).
Since people have expressed some interest in also having Win, Linux, ARM, AppleSilicon, etc. builds of OpenXION, and I may not have time, and I definitely don't have the hardware to build these 'native' builds of it... and because I've basically forgotten the steps I used to build it, I thought I'd post this nice article, it's probably what I read that prompted me to do it when I built the Mac X86-64 build.
https://medium.com/graalvm/cli-applicat ... 29a40aa0be
This one goes into finer detail:
https://medium.com/graalvm/working-with ... 12ccdcd61b
As far as I remember the steps boiled down to:
Install GraalVM and run some commands to make sure you're using GraalVM as your JVM,
Then install natifier, run another command that points it to the OpenXION distribution .java files,
And viola, spits out a self contained 'native' executable, the JVM thereafter is no longer required
in order to run that executable on whatever platform you built the binary for.
Looking at GraalVM's site, and some of the API documentation, it seems that the VM supports Linux, Mac, Windows + IOS/ANDROID, on Intel/ARM/AppleSilicon/RISC processors, so anything that Oracle supports I guess:
• Platform.AARCH64
• Platform.AMD64
• Platform.ANDROID
• Platform.ANDROID_AARCH64
• Platform.DARWIN
• Platform.DARWIN_AARCH64
• Platform.DARWIN_AMD64
• Platform.HOSTED_ONLY
• Platform.IOS
• Platform.IOS_AARCH64
• Platform.IOS_AMD64
• Platform.LINUX
• Platform.LINUX_AARCH64
• Platform.LINUX_AARCH64_BASE
• Platform.LINUX_AMD64
• Platform.LINUX_AMD64_BASE
• Platform.LINUX_RISCV64
• Platform.MACOS
• Platform.MACOS_AARCH64
• Platform.MACOS_AMD64
• Platform.RISCV64
• Platform.WINDOWS
• Platform.WINDOWS_AARCH64
• Platform.WINDOWS_AMD64