Folks, does someone was able to compile a Clojure code for native-image without using a Java "companion file"? Basically, I wanted to write all my code in Clojure only. My attempt was trying to use gen-class with the right signatures like org.graalvm.nativeimage.c.CCharPointer, but when I run lein uberjar it crashes with
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:445).
org.graalvm.nativeimage.c.CCharPointerI assume you're trying to compile clojure as a library rather than an executable so you can expose some clojure functions?
I use dtype-next to do all the dirty work, https://cnuernber.github.io/dtype-next/tech.v3.datatype.ffi.graalvm.html#var-expose-clojure-functions
Here's an example, https://github.com/phronmophobic/grease/blob/5af8a01ed610a38964f537544f6c3d2f5c3b1cb7/src/com/phronemophobic/grease/membrane.clj#L314
Yes, I'm trying to compile as a shared library