Skip to content

Demonstrates how to produce Graal Native Image CLIs from Kotlin JVM shadow JARs.

License

Notifications You must be signed in to change notification settings

tednology/native-cli-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

native-cli-example

Demonstrates how to produce a native binary using Graal Native Image in conjunction with a Kotlin JVM shadow JAR.

Getting Started

Requires Gradle (recommend latest, 7.3+).

Install GraalVM 23.1.0+ for your platform: https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.3.0. Use gu to install native-image (gu install native-image). Set this as your current Java.

Now you can build an executable native binary with gradle buildNative. It outputs the binary into the build/bin directory. Run it like any other platform binary, ex. ./build/bin/native-cli:

asciicast

Docker Images

To build a Docker image (Debian Linux), build the JAR first: gradle build, and then the docker image: docker build -tag <your-image-name-here> . You can now run it:

docker run -it --rm <your-image-name-here>

About

Demonstrates how to produce Graal Native Image CLIs from Kotlin JVM shadow JARs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published