cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 160 forks source link

Javascript to Java ? #657

Closed eix128 closed 3 years ago

eix128 commented 3 years ago

Hi , i want to convert and use javascript library in java. I did not find any Good solution. I can use javascript in GraalVM Like this:

public static void main(String[] args) {
    Context polyglot = Context.create();
    Value array = polyglot.eval("js", "[1,2,42,4]");
    System.out.println(array.getArrayElement(2).asInt());
}

But i need to use all library as polyglot.eval is there anything jsweet can do for that ?

can i use javascript library with high performance java ? I dont want any VM. Well if i need VM like GraalVM , is there any wrapper that generates all javascript function calls for java ?

renaudpawlak commented 3 years ago

Nope, JSweet is Java to TypeScript/JavaScript only. Thank you for asking and good luck in your search!