Graal.js: JavaScript on Graal and Truffle


  • Truffle is a multi-language interpreter framework. It is part of the GraalVM. The Truffle API allows implementing interpreters for a large variety of languages, that can then be executed on top of the JVM. Applying partial evaluation allows to compile the interpreted guest-language program to high-performance machine code.

    Based on Truffle, Graal.js, an ECMAScript 2017 compliant JavaScript engine is developed. It allows executing JavaScript and Node.js applications. Implementing it as Truffle-based AST interpreter guarantees easy maintainability and adaptability. It allows Oracle Labs to conduct further research on a complete language implementation. Current research directions include parallelization, language interoperability any simplification of interpreter/compiler implementation.

    Using the Graal compiler, Truffle/JavaScript can reach and potentially surpass the performance of current leading JavaScript engines.