4 ms·
Substrate is the key component that enables Ahead-of-Time compiled Native Images [1] on GraalVM. Java on Truffle enables bytecode to be dynamically loaded in a
by sradman 6y ago
Substrate is the key component that enables Ahead-of-Time compiled Native Images [1] on GraalVM. Java on Truffle enables bytecode to be dynamically loaded in a Native Image. Before Java on Truffle, you had to choose either pure compiled or pure dynamic.
[1] https://www.graalvm.org/reference-manual/native-image/ https://www.graalvm.org/reference-manual/native-image/
- vips7L 6y agoWhich is completely amazing considering how much dynamic and reflective code there is floating around in the Java ecosystem. I've never been able to compile anything beyond a trivial app with native-image because there is always something dynamic being used somewhere. I'm really looking forward to seeing where espresso goes.
- kaba0 6y agoI think reflection works with GraalVM native compile - the only catch is that the set of classes to be inspected by it should be known beforehand.
- pulse7 6y agoThis means you can't load JARs at runtime with ClassLoader in GraalVM natively compiled image...
- kaba0 6y agoYes. But for longer running apps you are probably better off with a JVM since it will have better peak performance.
- vips7L 6y agoYes but it's extremely difficult to know them before hand. Trust me I've tried. It's not a trivial thing to do. The only success I've had is with quarkus [0] and thats only if you don't go outside of what the framework provides. [0] https://quarkus.io/ https://quarkus.io/