REPL (read–eval–print loop) shell built ontop of JavaFX stack, GraalJS, GraalPython, TruffleRuby and FastR
-
Up-to-date GraalVM (for mobile builds this fork might be best since static libraries and relevant patches are added, prebuilt binaries for linux and macOS are provided)
-
GRAALVM_HOME
environment variable set (optimallyJAVA_HOME=$GRAALVM_HOME
, which should help withThe import org.graalvm cannot be resolved
error) -
GraalJS, GraalPython, TruffleRuby, FastR. Any combination of those will work, provided that
pom.xml
is edited accordingly. Those can be added either bygu install
(on stable versions) or better by adding them as dynamic mx imports -cd $GRAAL_SOURCE/vm # Assuming that GRAAL_SOURCE points to right location export FASTR_CAPTURE_DEPENDENCIES export FASTR_RELEASE=true export FASTR_NO_RECOMMENDED=true export PKG_LDFLAGS_OVERRIDE="-L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu" mx --dynamicimports /graal-js,graalpython,truffleruby,fastr build
-
Various other Ubuntu 18.04 dependencies (which might or might not be needed):
sudo apt -y install build-essential curl python git libxml2 ruby libssl-dev zlib1g-dev xorg-dev libcurl4-openssl-dev libgfortran-8-dev libgomp1 gfortran-8 libxml2 libc++-dev libpcre3 libpcre3-dev xz-utils; sudo apt -y install libgtk-3-dev libgdk3.0-cil-dev libpangocairo-1.0-0 libpango1.0-dev libgl1-mesa-dev libatk1.0-dev libcairo-gobject2 libavcodec-dev libavformat-dev libavutil-dev libasound2-dev libpangoft2-1.0-0 libgdk-pixbuf2.0-dev;
-
native-image-agent
in order to generate required reflection configuration in JVM mode. -
native-image
Go to pom.xml
in project root and edit nativeImageArgs
so that languages you have installed are uncommented (with !
removed), and that others are commented out.
So if you only have graalpython
installed, your configuration would look like this:
<nativeImageArgs>
<!--<list>-!-language:js</list>-->
<list>--language:python</list>
<!--<list>-!-language:ruby</list>-->
<!--<list>-!-language:R</list>-->
...
mvn clean javafx:run
(this will generate required reflection configuration - note that native-image-agent
is needed)
or if VSCode is used: ctrl+shift+b
-> Run JVM
mvn clean javafx:run@debug
or if VSCode is used: install Debugger for Java
extension and then press F5
Desktop: | mvn clean client:build client:package client:run |
Android: | mvn -Pandroid clean client:build client:package client:install client:run |
iOS: | mvn -Pios clean client:build client:package client:install client:run |
or if VSCode is used:
ctrl+shift+b
-> Build (Platform)
ctrl+shift+b
-> Run (Platform)