Embed a full JavaScript scripting engine into a C++ desktop application so users can automate or extend it with scripts
Compile ChakraCore on Linux or macOS and run JavaScript files with the included ch command-line tool
Use the C API to evaluate JavaScript expressions and pass results back into a host C application
Build a plugin system for a game engine or tool that accepts user-written JavaScript logic
Requires a C++ build toolchain and CMake, building on Windows also requires Visual Studio.
ChakraCore is a JavaScript engine, meaning it is the piece of software responsible for reading and running JavaScript code. It exposes a C programming interface, which makes it possible to embed a full JavaScript runtime inside any program written in C or C++. If you are building an application and want users to be able to write scripts in JavaScript to control or extend it, ChakraCore provides the machinery to do that. The engine was originally built by Microsoft and used inside the older Edge browser before Microsoft switched to a Chromium-based browser engine. At that point, Microsoft stopped using ChakraCore in Edge. Microsoft continued to issue security updates for version 1.11 until March 2021, but officially ended active development beyond that. The project has since continued as a community effort, with the focus shifted toward embedded use cases rather than browser environments. A JavaScript engine like this does not include the things a web browser or a runtime like Node.js adds on top, such as the ability to interact with web pages or the file system. ChakraCore is only the engine itself. When you embed it in your own application, you provide whatever input and output capabilities your program needs and call into ChakraCore to execute JavaScript logic. The engine can be compiled and run on Linux, macOS, and Windows for 64-bit processors. Building it on Windows additionally supports 32-bit and ARM processors. A small test application called ch is produced as part of the build and can be used to run simple JavaScript files directly from the terminal to confirm the engine is working. The project is open source under the MIT license. New contributors can help by reporting bugs, submitting fixes, or joining the community Discord server. Anyone interested in taking a more active role in the project's direction is invited to get in touch through the issue tracker or Discord.
← chakra-core on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.