anyone know if it is possible to use integrant with graalvm?
Yes it is. You can even run Duct in graalvm
(which is built with integrant)
👍
if you use ig/load-namespaces
it may cause you problems though.
Though even there I’d imagine it should be possible if you set *compile-files*
and run ig/load-namespaces
in a binding
.
True, I ran into this issue actually. I wrote a namespace to handle this with a macro. https://gist.github.com/kwrooijen/e932169d5fed2b84f464ef51777621cb
This will add require statements for any keys at compile time. So you don't have to require everything manually in the main
namespace
(This was specifically made for Duct though, not pure Integrant)
Interesting idea to use a macro… I’ve aot’d integrant systems before with the above approach using compile
and ig/load-namespaces
(or an alternative if you want to compile all keys) in a binding
, I’ve not tried it with graalvm though.
You can use the same approach to speed up working at a repl by essentially combining it with the instructions here, which was the main reason I did it:
https://clojure.org/guides/dev_startup_time