Skip to content

Ordina-JTech/the-holy-graalvm-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the-holy-graalvm-workshop

Workshop for The Holy GraalVM Meetup

Prerequisites

  • Docker
  • GraalVM
  • XCode CLI tools -> xcode-select --install

Setup

macOs

  • run mac-graalvm-ce.sh
  • run source ./env.sh in a terminal session
  • this terminal session should now be ready for Graal commands

Other OSs

  • Download and install GraalVM from the site (prerequisites)
  • set JAVA_HOME to <project_path>/graalvm-ce-1.0.0-rc13/Contents/Home
  • set PATH to <project_path>/graalvm-ce-1.0.0-rc13/Contents/Home/bin:$PATH

IntelliJ

  • Add GraalVM as a JDK.
  • Add the following file to the GraalVM Classpath: jre/lib/boot/graal-sdk.jar

Workshop

Polyglot example

  • Install the language engines for R, ruby and python with the following commands:
gu install R
gu install ruby
gu install python

NOTE: if you use the docker image as described below you don't have to install them as they are already installed.

  • Navigate to the polyglot directory
  • Run javac HelloPolyglot.java to compile HelloPolyglot.java with GraalVM.
  • Run java HelloPolyglot to run the application on GraalVM.

GraalVM Workshop docker image

A fully configured GraalVM Docker image has been made for this workshop to play around with.

you can run it with the following command:

docker run -it --rm --name graalvm -v $(pwd):/project -v ${HOME}/.m2:/root/.m2 ivonet/graalvm:1.0.0-rc14
  • Runs the GraalVM image in interactive terminal mode
  • Names it graalvm
  • Mounts the current folder into the /project folder of the container (which is the working dir)
  • Mounts the maven config dir into the container maven config dir
  • Removes itself (--rm) when closed (remove this if you want to save the state / container)

The command can of course be adjusted to your needs :-)

About

Workshop for The Holy GraalVM Meetup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published