Microsoft wants to open up Node.js to other JavaScript engines

The company also has its ChakraCore engine working on Linux and MacOS

Microsoft opens up Node.js to other JavaScript engines
Vic Brincat (Creative Commons BY or BY-SA)

Moving ahead with plans for its ChakraCore JavaScript engine, Microsoft is developing a standard interface to enable different virtual machines to access the Node.js server-side JavaScript platform. Now running on Linux and MacOS, ChakraCore is an alternative to the V8 engine underlying Node.js.

Microsoft said this week that it has a preview ready of Node-ChakraCore on Linux, which links ChakraCore to the popular Node.js server-side platform. The company also is featuring an experimental implementation of the ChakraCore runtime on x64 Linux and MacOS. ChakraCore is the open source core of the Windows-only Chakra JavaScript engine that powers Microsoft's Edge browser and the Universal Windows Platform.

Microsoft is trying to take Node.js  beyond its current ties to Google's V8 JavaScript engine. The company wants "to make Node be agnostic of the VM it supports based on a standard Node interface," said Arunesh Chandra, Microsoft senior program manager for ChakraCore, at the Node Summit conference in San Francisco this week. "Node is so sensitive to fluctuations in V8 that it breaks the ecosystem quite often," he noted. Microsoft is working with others, such as IBM, to encourage this change.

Other attempts have been made to port Node to other VMs, such as SpiderNode. Microsoft would like to standardize these efforts under one umbrella.

ChakraShim, a V8 API shim atop the ChakraCore runtime hosting API, powers Node.js on ChakraCore. It implements essential V8 APIs, making the change of the underlying JavaScript engine transparent to Node.js. The effort is still a work in progress, though, and is not an officially supported Node.js branch.

Microsoft claims that bringing ChakraCore to Linux and MacOS X enables developers to build cross-platform applications with the engine. For Linux, development and testing happens mostly on Ubuntu 16.04 LTS, but this support should translate to working with other distributions as well.

However, the engine currently is available on non-Windows platforms in a limited fashion only. "It's an experimental build," Chandra said. "It doesn't have JIT (just in time compilation) or high-performance GC (garbage collection) on it."

Copyright © 2016 IDG Communications, Inc.

How to choose a low-code development platform