Skip to content

pvorb/graalvm-kotlin-native-image-sample

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GraalVM & Kotlin native-image sample

Prerequisites

  • GraalVM needs to be installed and on $PATH

Building

./mvnw package

Running

target/graalvm-kotlin-native-image-sample-1.0.0

will print

Hello, world

Startup time

time target/graalvm-kotlin-native-image-sample-1.0.0
Hello, world
target/graalvm-kotlin-native-image-sample-1.0.0  0.00s user 0.00s system 83% cpu 0.003 total

vs

time java -jar target/graalvm-kotlin-native-image-sample-1.0.0.jar
Hello, world
java -jar target/graalvm-kotlin-native-image-sample-1.0.0.jar  0.08s user 0.01s system 106% cpu 0.082 total

Binary size

du -h target/graalvm-kotlin-native-image-sample-1.0.0
3.4M	target/graalvm-kotlin-native-image-sample-1.0.0

About

Example project showing how to build a native, static executable from a Kotlin project using GraalVM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages