Graal: Extending native applications with Java and JS

Created on 9 Dec 2018  路  3Comments  路  Source: oracle/graal

Hello,

I'd like to use Graal to extend a c++ application to support polyglot execution of Java and JS (ie, extending a native application).

However, it does not seem possible to use Java as a "guest-language." Would my best bet be to implement Java in truffle? Or is the Graal JVM compiler already using such an AST?

Alternatively, I suppose I could use JNI to embed GraalVM in JVM mode. Then I'd use the ToolProvider api to javac a passed .java URI, and then execute. One would lose the security benefit of running in Isolates however.

question

All 3 comments

We are already working on a Truffle bytecode interpreter for GraalVM. Still an early prototype but it's already able to run javac and compile itself.
Fully dynamic Java code e.g. user provided; it's not supported by SVM.

Awesome! Looking forward to seeing truffleJava. Since substrate VM doesn't support dynamic loading, I'll just use JNI then (or maybe even a Panama project early access 馃槈 )

We generally want to avoid the name TruffleJava because it implies that the Java we are running is somehow different.
The project name is Espresso and is just "Java on GraalVM".

Was this page helpful?
0 / 5 - 0 ratings