Coming Soon: Node.js Support in ChakraCore

The goal is to eventually get developers to start working more diligently on apps aimed at the Windows 10 IoT Core platform by way of Node.js. That's where Node.js Tools for Windows IoT 1.5 comes in.

Just last week, Microsoft announced that it had open sourced ChakraCore, which pretty much opens up the JavaScript engine to more development platforms, particularly non-Windows platform. Even then, there's still work to do to open it up to Windows ones, like the Windows 10 Core IoT platform. To that end, Guarav Seth, principal program manager with the Chakra team, said that his team has submitted a pull request to "mainline Node.js" using the open-sourced Chakra engine.

"The recent open-sourcing of ChakraCore gives us the opportunity to develop in the open and align better with Node.js release schedules, in addition to expanding our support for Node.js across the broader Windows ecosystem – starting with Windows 7 SP1 and beyond," writes Seth, in a blog.

Seth notes that the pull request has a few goals in mind. One is to enable ChakraCore engine to use Node.js as an option via a shim. "This shim implements the most essential V8 APIs so that the underlying JavaScript engine change is transparent to Node.js and other native addon modules written for V8," he said. "All that is needed is to rebuild Node.js executable and native addon modules with ChakraCore."

Another goal is to maintain npm module compatibility. "There is a small subset of modules that are natively bound to V8 APIs and can run into compatibility issues with a different VM or even a different version of V8," said Seth. Thus, the group created the Native Abstractions for Node.js project to ensure that "all NAN based modules are fully supported in Node.js with ChakraCore."

As that effort gets underway, the group has also released an update, version 1.5, of its Node.js Tools for IoT. What's noteworthy here is that a version of the tools released in September that allowed Node.js to work with Chakra while developing Windows 10 IoT apps from the console now supports Node.js and ChakraCore in version 1.5. "ChakraCore will be developed in the open, will see faster updates, and will work across different Windows OS starting from Windows 7 and higher.," writes Arunesh Chandra, a senior program manager colleague of Seth's on the Chakra team, in a separate blog.

Version 1.5 also works well with Universal Windows Apps, as it readily installs all the files needed to create a UWP app in Node.js. "This option allows familiar Visual Studio experience," writes Chandra. Debugging improvements, and support for Node.js Toosl for VS 1.1 and Node.js build 5.4.1 are built in. As well, it comes with more templates for project initiation,including one for the JavaScript-based Johnny-Five robotics and IoT programming framework.

About the Author

You Tell 'Em, Readers: If you've read this far, know that Michael Domingo, Visual Studio Magazine Editor in Chief, is here to serve you, dear readers, and wants to get you the information you so richly deserve. What news, content, topics, issues do you want to see covered in Visual Studio Magazine? He's listening at [email protected].

comments powered by Disqus


Subscribe on YouTube