3 ms·
See here for a guide on how to compile some Java code to a native library: https://www.graalvm.org/latest/reference-manual/native-image/guides/build-native-sha
by mike_hearn 3y ago
See here for a guide on how to compile some Java code to a native library:
https://www.graalvm.org/latest/reference-manual/native-image/guides/build-native-shared-library/ https://www.graalvm.org/latest/reference-manual/native-image...
One of the kinds of code you can compile this way is a language interpreter using the Truffle framework, which is a way to write interpreters that turns them into advanced JIT compilers automatically. If you do that then your language interpreter, runtime and the Graal/Truffle JIT compiler will all be compiled into your shared library. You can then export a C API from it using the technique shown in that article to load and execute code.