Culture / Development / Edge / IoT

Node.js Foundation Doubles Down on Node.js API, ChakraCore

29 Nov 2016 6:00am, by

The Node.js Foundation is working on enabling the Node.js server-side JavaScript runtime to run in environments outside of its familiar Google V8 JavaScript engine, in an effort known as “VM neutrality.”

The Node.js Foundation’s Node.js API working group and the ChakraCore project are taking steps to ensure that Node.js will work with different virtual machines (VMs), in addition to V8, so that Node developers can have more choice and target different mobile platforms, the foundation announced at the Node.js Interactive North America 2016 conference, being held this week in Austin.

Node.js already is popular as a platform of choice for Internet of Things (IoT) applications, as Node.js is available on Samsung’s JerryScript engine — a lightweight JavaScript for IoT.

Moreover, when Node.js is not linked to a specific VM, developers can pair it with different VMs to meet the particular needs of mobile applications, to extend the benefits of Node.js — ease of use, higher density coding, performance — to more mobile app developers, the foundation said in a blog post.

According to the Node.js Foundation, VM neutrality describes a state of Node.js where Node Core is neutral to the JavaScript engine that is powering it via open standards and open APIs.

“The idea is to create a more formal interface between Node.js and its VM,” the foundation asserted in a statement. “In a VM-neutral world, the Node.js ecosystem, especially the native modules, continues to seamlessly work on different JS VMs on a variety of different devices and workloads.”

VM neutrality enables Node.js to support new devices and workloads, and enables developers to extend the reach of the Node.js ecosystem. It also helps developers to reuse code and to standardize multi-VM efforts.

“A large part of the Foundation’s work is focused on improving versatility and confidence in Node.js,” said Mikeal Rogers, community manager of the Node.js Foundation, in a statement. “Node.js API efforts support our mission of spreading Node.js to as many different environments as possible. This is the beginning of a big community web project that will give VMs the same type of competition and innovation that you see within the browser space.”

At Node.js Interactive, the Node.js Foundation announced new milestones for its Node.js API (NAPI) effort to define a stable module API that is independent from changes in V8. This will make things easier for module maintainers as well as for developers by giving them more stability as well as more module choices.

The Node.js module community has 350,000 modules and more than a billion weekly package downloads. The Node.js API work enables modules to run against a newer version of Node.js without recompilation.

“This work on the Node API will lead to greater stability in the module ecosystem due to independence from Node.js version changes, giving the developer greater flexibility as new Node.js versions are introduced,” said Michael Dawson, runtime developer at IBM, in a statement. “Furthermore, this enhancement is a concrete step toward the strategic end goal of VM neutrality.”

Meanwhile, the Node.js Foundation also announced that the Node.js build system will start producing nightly node-chakracore builds, enabling Node.js to be used with the ChakraCore JavaScript engine developed at Microsoft.

Microsoft describes ChakraCore as the core part of Chakra, the high-performance JavaScript engine that powers Microsoft Edge and Windows applications written in HTML, Cascading Style Sheets (CSS) and JavaScript — the three foundational technologies of the web.

ChakraCore supports Just-in-time (JIT) compilation of JavaScript for x86/x64/ARM, garbage collection, and a broad range of the latest JavaScript features, Microsoft said. ChakraCore also supports the JavaScript Runtime (JSRT) APIs, which enables developers to easily embed ChakraCore in their applications.

Arunesh Chandra, senior program manager for ChakraCore at Microsoft, demonstrated both NAPI and the latest ChakraCore developments at the conference.

“Allowing Node.js to work on multiple engines enables Node.js to run on a variety of different systems in a highly optimized way — including the IoT systems,” said Microsoft’s Chandra in a statement. He noted that Microsoft’s collaboration with the community will spur more innovation and create more choice for Node.js developers.

Moreover, the foundation said node-chakracore is working to improve debugging in Node.js with Time-Travel debugging. The JavaScript Time-Travel Debugger project comes out of Microsoft Research. The debugger supports reverse variations of the step forward operations in a debugger to enable a developer to easily reverse program execution time to see the exact sequence of statements and program values leading to an error, Microsoft said.

“Huge strides have been made in improving the technical state of how Node.js interacts and manages expectations with the underlying JavaScript VM,” said Dan Shaw, CTO and co-founder of NodeSource, in a statement. “The fully open source nature of ChakraCore makes testing new features extremely easy.”

nodeinteractive

Feature image: Austin street art, by North 4th.

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.