React, etc. Tech Stack

React, Flux, GraphQL, Hack, HHVM...? All of this and more!

Project Detroit seeks to bring the V8 JavaScript engine to OpenJDK

OpenJDK is the Open Source Java runtime. The project organisation is now ushering in a new project known as "Detroit". The name is a reference to the plan of integrating the Google Chrome V8 JavaScript engine to the JVM.

The Project aims to be the base for a native implementation of javax.script package based on the Open Source JavaScript engine V8. The JS runtime is nowadays a ubiquitous as browsers like Chrome and Opera are using it. On the server side V8 is the backbone of Node.js.

The work will commence by continuing on the prototype presented by James Laskey at the JVM Language Summit 2017 event in his "Native Script Engine or Go Panama" talk:

The final results aim to contain V8 itself, as well as the required bindings for Java and JavaScript for OpenJDK. This will enable running and executing JavaScript code from within Java applications. Developers can load it on request and then a new javax.script.ScriptEngine implementation will be available to execute JavaScript.

A modest beginning for V8 in OpenJDK

The Java community already has a similar project in Nashorn, and to provide compatibility the team aims to provide the most common extensions from that world to the Detroit implementation. Namely Java and JavaScript interops to enable access, instatiation and other tasks for Java types from JavaScript.

The target audience is small initially, so resources are limited and the project will only target Linux and macOS (AKA Mac OS X) operating systems. The initial team consists of five members from the Nashorn team:

The project is currently only a proposal on the OpenJDK mailing list, but will move forward if the vote goes through.

Regardless or not if the project forges ahead - Detroit is a prime example of how the software ecosystems have merged in the recent decade. Just consider the transpilation of PHP code to .NET compatible C#. That would have been unimaginable some years ago.

Written by Jorgé on Thursday February 1, 2018

Permalink - Tags: java, javascript

« Peachpie online REPL transpiles PHP to C# on the fly - Privacy focused Turing Phone maker to go bust? »