Microsoft Brings ChakraCore To Linux And OS X

It was in January, when Microsoft open-sourced ChakraCore, which is the core of the Chakra JavaScript engine that  powers Microsoft Edge and Universal Platform. At the NodeSummit, Microsoft shared the first experimental implementation of ChakraCore interpreter and runtime on x64 Linux and OS X 10.9+ along with experimental Node.js with ChakraCore (Node-ChakraCore) on x64 Linux. The company states that the development and testing on Linux mainly took place on Ubuntu 16.04 LTS. However, the support should easily translate to other modern Linux distributions.
Image Source:
Microsoft in its official blog states,
“ChakraCore and by extension Node-ChakraCore, on other platforms have the same support for the broad set of JavaScript features as their Windows counterparts, as measured by the official ECMAScript conformance suite, test262 (with the exception of Intl features, which are in progress). The current cross-plat implementation doesn’t yet support JIT compilation and concurrent and partial GC features, which we will enable as development progresses further.”
Building cross-platform applications with ChakraCore
Microsoft states,
“Bringing ChakraCore to Linux and OS X is all about giving developers the ability to build cross-platform applications with the engine.”
The JavaScript Runtime (JSRT) APIs for hosting ChakraCore had originally been designed for Windows, so they inevitably came with a few Windows dependencies, like for example Win32 usage of UTF16-LE encoding for strings, where other platforms might use UTF8-encoded strings. As this is the part of enabling cross-platform support, some JSRT APIs have been refactored as well as redesigned so as to allow developers to write platform agnostic code in order to embed ChakraCode. Maintaining backward compatibility is the core principle followed by Microsoft, and hence, applications which are written with the earlier set of JSRT APIs on Windows will go on to work as they did before. You can easily go on to build the engine and write a Hello-world app so as to get started with ChakraCore on Windows/Linus/OS X.
Node-ChakraCore on Linux
In one of the statements of Microsoft,
“It has been a little over a year since we started working on Node-ChakraCore, with the intention to grow the reach of Node.js ecosystem. One of the fundamental goals of this project from the beginning has been to ensure that the existing ecosystem continues to just work, in an open and cross-platform way exactly like Node.js.”
Currently, Microsoft is taking another step in Node-ChakraCore journey. They are also sharing the first preview for Node-ChakraCore on Linux at their repos. This is quite an early step in the full support for Linux. However, Microsoft have gone ahead and shared its progress.
Image Source:
The company states,
“This is just the beginning of our cross-platform efforts, and we will keep enhancing our cross-platform support. We will continue to update the ChakraCore roadmap as we make progress. We’re currently working on Intl support, so that ChakraCore has feature parity across platforms. Also high on our list of priorities is to ensure non-Windows ChakraCore users experience the same top-tier JavaScript performance available on Windows today. To enable that, we’ll bring the fully-capable ChakraCore JIT compiler and concurrent and partial GC on Windows to other platforms. These features will bring improved performance to Node.js and other applications hosting ChakraCore as well.”