DEV Community

özkan pakdil
özkan pakdil

Posted on • Originally published at ozkanpakdil.github.io on

Ktor build with graalvm

I wanted to test ktor.io with graalvm build, main problem is all code I found using gradle and my project is using mvn here is the code. like other modules I needed to create reflect config json, otherwise ktor serialize is not working properly with graal and when I send a request to “/hello” endpoint I got empty response. I tried to write myself but did not work and at the end I used command below

java -agentlib:native-image-agent=config-output-dir=./graalcnf/ -jar target/ktor-demo-1.0.1-SNAPSHOT-jar-with-dependencies.jar

Enter fullscreen mode Exit fullscreen mode

when I ran this command in ktor-demo folder it created graalcnf folder and wrote every required files there. After that we need to give those to graal native build with the config below

Args = --enable-http \
-H:IncludeResources=.*\\.properties \
  -H:ConfigurationFileDirectories=${project.basedir}/graalcnf/ 

Enter fullscreen mode Exit fullscreen mode

Check here to see full configuration. ktor and other imagesKtor response with graal vm is 35 and quarkus is 23. can see full respot here.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up