Is it possible to build a clojure native app that doesn't have initialize-at-build-time? Stepping back I would like to use xgboost and xerial-larray, both of which have jni bindings and it appears from graalvm-native's documentation this is possible but there appear to be static initialization issues. So if there is a known example, java or otherwise, of someone using libraries that use JNI that may also help a bit.
Also, I know that there is a solid pool of documentation about using graal native with Clojure. Where are those docs?
Check out the topic of this channel
@chris441 I have a couple of examples that use JNI. E.g. https://github.com/borkdude/clojure-rust-graalvm. https://github.com/epiccastle/spire is also one.
Awesome, thanks
@chris441 As for static initialization issues: you can make exceptions for specific classes, e.g. https://github.com/babashka/babashka-sql-pods/blob/5d04e7fce699741e1b5e8488cf0a8f70843a3e2e/script/compile#L60
beautiful 🙂.
clojure-rust is also a pathway I have looked at before but using JNA or JNR...neither of which work (for good reason) in graal native
Also, sql bindings....really nice. That was going to be a question soon.
Do you have a replacement for sun.misc.Unsafe?
I've never used that class, sorry
As for tips and tricks: https://github.com/lread/clj-graal-docs