by rubyfan · 9y ago · 0 comments
Does the ability to use Java libraries with TruffleRuby go away with SubstrateVM though?
I'm thinking of Shenandoah specifically.
I understand they depend on inserting barriers with JVMCI, so I'm hopeful for compatibility. How is SubstrateVM build? It is made out of using the OpenJDK code base in a specific manner?
I really like the idea of TruffleRuby becoming its own super fast Ruby implementation unhindered by the need to provide the same feature set as JRuby.
A limitation of the SubstrateVM build is you can't just start calling code in a JAR you load at runtime -- that needs to be built into the image. A common use case for JRuby is as a really awesome shell to Java. You won't have that capability with SubstrateVM because we can't load arbitrary Java code at runtime. Likewise, you couldn't just swap out JARs with different implementations of interfaces on the fly (e.g., JDBC usage patterns). And JRuby can load gems that themselves have Java code in them, which also wouldn't work (setting aside the fact we also don't support their extension API).