New GraalVM project Crema now supports runtime class-loading. Here's a full Clojure runtime built with GraalVM native-image + Crema: https://github.com/borkdude/cream
Though to my mind the correct solution would be to launch a program + VM, then freeze/store the program state. Then you could just memcopy+execve the program and immediately skip all the initialization
(after a bit of Googling it seems this isn't a new idea haha, and it's in the JVM roadmap with Project Leyden. Should come out in maybe JDK 27 and make a lot of this stuff obsolete)
Though to my mind the correct solution would be to launch a program + VM, then freeze/store the program state. Then you could just memcopy+execve the program and immediately skip all the initialization
(after a bit of Googling it seems this isn't a new idea haha, and it's in the JVM roadmap with Project Leyden. Should come out in maybe JDK 27 and make a lot of this stuff obsolete)