namuan / kt-cli-app

Sample Kotlin command line application generating native image using GraalVM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kotlin Command Line Application

This is a sample Kotlin command line application.

Install this application

MacOS X

brew install namuan/tap/kt-cli-app

Setup

Install SDKMAN! (https://sdkman.io/install)

Download GraalVM

sdk install java 22.3.r19-grl

Install native-image builder

sdk use java 22.3.r19-grl
gu install native-image

Set environment variable for GraalVM. Make sure you have it correctly setup if you get the following error

--------------------------------------------------------
'gu' tool wasn't found. This probably means that JDK at isn't a GraalVM distribution.
export JAVA_HOME=`sdk home java 22.3.r19-grl`

Alternatively, use the following command from the project directory

sdk env

Build

make build

Run

make run

Credits

Based on the previous work by grodzickir

About

Sample Kotlin command line application generating native image using GraalVM

License:MIT License


Languages

Language:Kotlin 49.1%Language:Makefile 30.4%Language:Smarty 20.5%