Fork me on GitHub
#babashka
<
2021-08-05
>
Yehonathan Sharvit06:08:57

A question not directly related to babashka but to GraalVM: When we compile a Clojure app to a binary format with GraalVM, is there a way to connect to the app via a REPL and to modify running code?

lispyclouds06:08:23

no. its all machine assembly at that point. There is no compiler present. Also graalvm native image cannot load classes/interpret bytecode at runtime.

lispyclouds07:08:21

one recommended way is to develop the app using the normal clojure repl and then compile native when done 😄

borkdude07:08:57

However, you can include babashka nREPL and expose a SCI environment. This will allow you to execute and manipulate state in your app via functions you expose. See e.g. #graalvm-mobile

borkdude07:08:33

I think espresso also works with native image so this may open up new possibilities but currently not so clear yet