ChakraCore On Linux and macOS

Microsoft released the open source Windows version of its Chakra JavaScript engine, called ChakraCore, in January 2016. The company uses the engine in the Edge browser and the company’s Universal Windows Platform. As Microsoft promised earlier, the company is also supporting the Linux and macOS platforms as well with its Chakra engine.

As the name implies, “ChakraCore” is the core component of Microsoft’s Chakra JavaScript engine, which supports Just-in-time (JIT) compilation (only with Windows for now), garbage collection and many of the latest JavaScript features.

JIT compilations, as well as concurrent and partial garbage collection features, are still a work in progress for Linux and macOS. Microsoft discovered several issues with Windows dependencies for various APIs when trying to port ChakraCore to Linux and macOS, but the company refactored the APIs. At the same time, it maintained backwards compatibility for apps that use the old APIs.

Microsoft wants ChakraCore to have the same JavaScript performance on Linux and macOS that it currently has on Windows, which should happen as the Linux/macOS versions achieve feature parity, such as JIT compilation and the currently lacking GC features. These changes should also improve Node.js performance and other applications hosting ChakraCore.

Node-ChakraCore, which is a version of Node.js that replaces Google’s V8 JavaScript engine with ChakraCore, also works on Linux now. However, it exists only as a preview for now, so it’s not yet ready for production.

As Microsoft shifts focus to cloud services, it seems not to care as much whether its products use proprietary technology anymore. That means open sourcing some of its software can become a viable strategy for the company, much as it did for Google over the years. An open source approach can also lead to more developers using its tools, regardless of whether they are using them on Windows, Linux, or macOS.

Finally, the strategy can foster goodwill within the developer community, even as the company continues to create various controversies with its Windows 10 decisions - the latest one being its decision to disallow users from disabling the contextual tips and store suggestions in Windows 10 Pro.