Bringing ChakraCore to Linux and OS X

Windows

Windows
In January, we
Please, Log in or Register to view URLs content!
ChakraCore, the core of the Chakra JavaScript engine that powers Microsoft Edge and Universal Windows Platform. We expressed our ambition to bring our best-in-class, but Windows-only, JavaScript engine to other platforms, with Linux as the prioritized target. Today at NodeSummit, we are delighted to share our progress – the first experimental implementation of ChakraCore interpreter and runtime on x64 Linux and OS X 10.9+, along with experimental
Please, Log in or Register to view URLs content!
Please, Log in or Register to view URLs content!
(Node-ChakraCore) on x64 Linux. Our development and testing on Linux happens primarily on Ubuntu 16.04 LTS, but the support should easily translate to other modern Linux distributions.

Please, Log in or Register to view URLs content!

ChakraCore on Linux and OS X


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,
Please, Log in or Register to view URLs content!
(with the exception of
Please, Log in or Register to view URLs content!
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


Bringing ChakraCore to Linux and OS X is all about giving developers the ability to build cross-platform applications with the engine. The
Please, Log in or Register to view URLs content!
to host ChakraCore were originally designed for Windows, so they inevitably had a few Windows dependencies – for example, Win32 usage of UTF16-LE encoding for strings, where other platforms might use UTF8-encoded strings. As part of enabling cross-platform support, some of the JSRT APIs have been refactored and redesigned to allow developers to write platform agnostic code to embed ChakraCore. Maintaining backwards compatibility is a core principle that we follow – so applications written with the previous set of JSRT APIs on Windows will continue to work as is. You can
Please, Log in or Register to view URLs content!
and write a
Please, Log in or Register to view URLs content!
to get started with ChakraCore on the Windows/Linux/OS X.

Node-ChakraCore on Linux


It has been a little over a year since we
Please, Log in or Register to view URLs content!
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.

Earlier this year, shortly after open sourcing ChakraCore, we
Please, Log in or Register to view URLs content!
to Node.js mainline to enable Node.js to work with ChakraCore. Today, we are taking another major step in the Node-ChakraCore journey. As part of enabling Linux support for ChakraCore, we are also sharing the
Please, Log in or Register to view URLs content!
for Node-ChakraCore on Linux at our repo. This is a very early step in our full support for Linux, but we are excited to share the progress.

Please, Log in or Register to view URLs content!

Running http-server sample on Node-ChakraCore


Coming up next

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
Please, Log in or Register to view URLs content!
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
Please, Log in or Register to view URLs content!
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.

To the community

Our cross-platform journey has been made possible by great support from the community. We are grateful for the advice and feedback we received on ChakraCore
Please, Log in or Register to view URLs content!
and
Please, Log in or Register to view URLs content!
discussions, as well as plenty of high-quality pull requests that we have accepted to date. We look forward to seeing more developers
Please, Log in or Register to view URLs content!
to the projects, and encourage developers to try out our experimental Linux and OS X support, and even build upon what we have and submit PRs to port it to platforms of their choice. As always, we are eager to hear your feedback – you can always reach us by opening issues on
Please, Log in or Register to view URLs content!
or
Please, Log in or Register to view URLs content!
repo or send us a tweet
Please, Log in or Register to view URLs content!
.

Please, Log in or Register to view URLs content!
, Program Manager, Chakra
Please, Log in or Register to view URLs content!
, Sr. Program Manager, Chakra

Please, Log in or Register to view URLs content!
 

Users who are viewing this thread

Top