Skip to content

Latest commit

 

History

History

graal-native

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Graal native image uses ahead-of-time compilation to build an optimized executable.

Install GraalVM using sdkman.io

sdk install java 22-graal
sdk use java 22-graal
export JAVA_HOME=${SDKMAN_DIR}/candidates/java/current

Run on the JVM with an agent to capture class metadata

./gradlew run -Pagent

Copy the metadata as the source configuration

./gradlew metadataCopy --task run --dir src/main/resources/META-INF/native-image

Compile and run the native binary

./gradlew nativeRun

Try the binary yourself

./build/native/nativeCompile/graal-native

Run the tests against the native binary

./gradlew nativeTest