Fork me on GitHub
#graalvm
<
2022-12-30
>
tatut06:12:42

I haven’t done any graalvm builds myself, so sorry if this is a newbie question, but should JNI using libraries work out of the box with graalvm? I’m thinking specifically about RocksDB (the fat jar has linux, windows and mac libs baked in)

borkdude07:12:10

You can make JNI work but probably not out of the box unless there is a known configuration for it

tatut07:12:24

I was afraid it wouldn’t be that easy

tatut07:12:57

if I need to delve into the internals of rocksdb jni, it sounds like it might be quite a lot of work

borkdude07:12:32

It seems quarkus has support for Kafka streams so this probably means you could copy something or something might already be available in the registry

tatut08:12:16

I don’t see the connection, does kafka use rocksdb?

borkdude08:12:14

Yes, Kafka streams apparently. Google around and you’ll see the quarkus issue.

tatut08:12:56

interesting, I had no idea… thanks

tatut08:12:01

I’ll look around

skynet00:12:08

you can also use the graal tracing agent https://www.graalvm.org/latest/reference-manual/native-image/metadata/AutomaticMetadataCollection/ along with a similar agent for clojure https://github.com/luontola/clojure-native-image-agent the graal tracing agent can generate JNI and other config from running your program