ChakraCore is an open source Javascript engine with a C API.



Discord Chat Licensed under the MIT License PR's Welcome

ChakraCore is a Javascript engine with a C API you can use to add support for Javascript to any C or C compatible project. It can be compiled for x64 processors on Linux macOS and Windows. And x86 and ARM for windows only. It is a future goal to support x86 and ARM processors on Linux and ARM on macOS.

Future of ChakraCore

As you may have heard Microsoft Edge no longer uses Chakra. Microsoft will continue to provide security updates for ChakraCore 1.11 until 9th March 2021 but do not intend to support it after that.

ChakraCore is planned to continue as a community project targeted primarily at embedded use cases. We hope to produce future releases with new features and enhancements to support such use cases. We also would like to invite any interested parties to be involved in this project. For further details please see the following draft planning documents: Overall plan Version 1.12 plan

Also see discussion in issue #6384

If you'd like to contact the community team please either open an issue or join the discord chat linked above.


If you believe you have found a security issue in ChakraCore 1.11, please share it with Microsoft privately following the guidance at the Microsoft Security TechCenter. Reporting it via this channel helps minimize risk to projects built with ChakraCore.

If you find a security issue in the Master branch of Chakracore but not in 1.11 please join our discord server and private message one of the Core team members.


Building ChakraCore

You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 or above, with either Visual Studio 2015 or 2017 with C++ support installed. Once you have Visual Studio installed:

  • Clone ChakraCore through git clone
  • Open Build\Chakra.Core.sln in Visual Studio
  • Build Solution

On macOS you can build ChakraCore with the xcode command line tools and cmake. On Linux you can build ChakraCore with cmake and ninja.

More details in Building ChakraCore.

Alternatively, see Getting ChakraCore binaries for pre-built ChakraCore binaries.

Using ChakraCore

Once built, you have a few options for how you can use ChakraCore:

  • The most basic is to test the engine is running correctly with the application ch.exe (ch on linux or macOS). This app is a lightweight host of ChakraCore that you can use to run small applications. After building, you can find this binary in:
    • Windows: Build\VcBuild\bin\${platform}_${configuration} (e.g. Build\VcBuild\bin\x64_debug)
    • Mac/Linux: buildFolder/config/ch (e.g. out/Release/ch)
  • You can embed ChakraCore in your applications - see documentation and samples.

A note about using ChakraCore: ChakraCore is a JavaScript engine, it does not include the external APIs that are provided by a Web Browser or nodejs. For example, DOM APIs like document.write() are additional APIs that are not provided by ChakraCore, when embedding ChakraCore in an application you will need to implement your own input and output APIs. For debugging, in ch you can use print() to put text to the terminal.

Alternatively, if you are using the vcpkg dependency manager you can download and install ChakraCore with CMake integration in a single command:

  • vcpkg install chakracore


Contributions to ChakraCore are welcome. Here is how you can contribute to ChakraCore:

Please refer to Contribution Guidelines for more details.


Code licensed under the MIT License.

Contact Us

If you have questions about ChakraCore, or you would like to reach out to us about an issue you're having or for development advice as you work on a ChakraCore issue, you can reach us as follows:

  • Open an issue and prefix the issue title with [Question]. See Question tag for already-opened questions.
  • Discuss ChakraCore with the team and the community via the Discord link above
  • Fix various spelling errors.

    Fix various spelling errors.

    Fix various spelling errors.

    Fixes misspellings of:

    • a..z (the English alphabet sequence a..z with one pair of letters transposed)
    • actual
    • algorithm
    • amount
    • although
    • argument
    • array
    • as
    • assignment
    • auxiliary
    • availability
    • avoiding
    • because
    • beginning
    • built
    • canonicalization
    • canonical
    • catch
    • causes
    • collection
    • committed
    • compare
    • comparison
    • compilation
    • completed
    • concurrent
    • conditions
    • constructor
    • contain
    • context
    • contiguous
    • conversion
    • convert
    • corresponding
    • counterparts
    • coverage
    • covered
    • current
    • declaration
    • default
    • deferred
    • delimiters
    • dependencies
    • descriptions
    • descriptor
    • diagonal
    • dictionary
    • differently
    • different
    • disposed
    • dynamically
    • dynamic
    • earlier
    • emitting
    • empty
    • emulated
    • encodable
    • enough
    • entrypoint
    • enumerable
    • environment
    • evaluate
    • everything
    • exactly
    • exception
    • exercised
    • existing
    • expandos
    • explicitly
    • extension
    • floatarray
    • for-in
    • foreign
    • function
    • generate
    • generator
    • granularity
    • identical
    • implemented
    • implicit
    • inclusive
    • index
    • indicate
    • indicating
    • infinity
    • initializer
    • initial
    • injection
    • inlinable
    • inline
    • insertion
    • instance
    • instantiate
    • interior
    • interpreter
    • interpret
    • invalidation
    • invoke
    • iterable
    • iterator
    • javascript
    • label
    • lambda
    • lane
    • language
    • left
    • length
    • manager
    • maximum
    • member
    • memory
    • message
    • metadata
    • necessarily
    • occurrence
    • offset
    • offsets
    • of lit (two word sequence)
    • ofobj
    • ofreturn
    • optimization
    • original
    • outer
    • output
    • overridable
    • overridden
    • owning
    • parameter
    • participate
    • perlargest
    • physical
    • pollute
    • polyfill
    • polymorphic
    • popping
    • possibility
    • preceded
    • precise
    • precision
    • preferenced
    • primitive
    • processed
    • profiled
    • profile
    • program
    • progress
    • propagate
    • prop'd
    • properties
    • property
    • prototype
    • recycler
    • re-enable
    • referenceable
    • reference
    • registers
    • removed
    • required
    • result
    • semantics
    • semicolon
    • separately
    • separator
    • sequences
    • should
    • sibling
    • signature
    • similar
    • simultaneously
    • source
    • sources
    • spec'd
    • specialization
    • statement
    • store
    • straight
    • subtags
    • succeed
    • successful
    • sufficient
    • summation
    • supplied
    • supported
    • support
    • surrogate
    • telemetry
    • ternary
    • testing
    • then
    • the
    • though
    • threshold
    • timing
    • transferred
    • traversal
    • truncation
    • typespec'd
    • underflow
    • uninitialized
    • unknown
    • unless
    • unregister
    • unroll
    • unscopable
    • using
    • value
    • variable
    • verifies
    • verify
    • visitor
    • without
    • zero


    • ForceES5Array


    • a/an
    • any one of the ... is
    • as an input/output
    • because
    • be replaced
    • different thresholds
    • have
    • is
    • is a
    • it is
    • lossless
    • not to report
    • operations
    • required by
    • the
    • true
    • a tortured sentence involving interleaving

    Tagging an ambiguous token with a guess

    • pronunciation


    Review on Reviewable

    opened by jsoref 64
  • [Community] What are you building with ChakraCore?

    [Community] What are you building with ChakraCore?

    With our efforts to enable cross-platform development, and recently, to enable the use of NuGet packages for ChakraCore development with .NET and Native apps (#85), as well as other work we've been doing to enable other scenarios, we're interested in hearing from the community about what you've been building with ChakraCore, and what you would like to build.

    Besides the issues you file, the feedback you give us on Gitter, and other tags of the ChakraCore project, we don't have as much visibility into your needs as we would like, we're hoping to hear from you about anything you'd like to share with us about your projects.

    Some questions we have in mind:

    • What projects are you working on?
    • What have your experiences been when working with ChakraCore?
    • Is our documentation helpful? If not, how can we improve? Were you able to find answers to your questions?
    • Have you written any blog posts or made any other public documentation about your experiences with ChakraCore? We'd love to read them!
    • Is there anything we can do to improve your development experiences?
    • Are you interested in contributing to ChakraCore but something is blocking you from making progress?

    Below, I’m tagging some folks who replied to #85, various other GitHub issues, and/or on Gitter with interest in a NuGet package for .NET and/or Native apps, or have otherwise indicated interest in developing with ChakraCore:

    @resnyanskiy @gulbanana @ormico @jimmcslim @Oceanswave @matthargett @pre10der @MartinJohns @Fishrock123 @WickedA @jackTheRipper @dthompso99 @CatCatCatDog @fubar-coder @alexhultman @snowmantw @kphillisjr @TomSeymour @navidR @liydu @likidu @lwansbrough @atanasovg @galvesribeiro @ReubenBond @ninlar @kostaspl @lwansbrough, etc.

    /cc @digitalinfinity @boingoing @liminzhu @bterlson @aruneshchandra @edmaurer @sethgaurav

    opened by dilijev 55
  • Discuss JsRTDebugging APIs

    Discuss JsRTDebugging APIs

    I have implemented significant part of new APIs to debug ChakraCore and flushed most of bugs using debugger implemented in ch.

    Before opening the PR request for merging code from JsRTDebugging to master it will be good to discuss the APIs name, signature and arguments.

    Please take a look at and provide any feedback you have.

    opened by agarwal-sandeep 46
  • Chromium adoption in Microsoft Edge and future of ChakraCore

    Chromium adoption in Microsoft Edge and future of ChakraCore

    Hello Friends of ChakraCore,

    Yesterday, Microsoft Edge announced its intent to adopt the Chromium open source project in the development of desktop Microsoft Edge to create better web compatibility and less fragmentation for web developers and customers. You can read the announcement blog for more information.

    We’ve seen your questions for ChakraCore and we want to be transparent and honest with the open-source community that has given us so much support. To be compatible with the rest of the platform and reduce interoperability risks, Microsoft Edge will use the V8 engine as part of this change. There is much to build and learn, but we’re excited to take part in the V8 community and start contributing to the project.

    ChakraCore is currently being used in various projects outside the browser. So, despite the change of direction for Microsoft Edge, our team will continue supporting ChakraCore. We will ensure that any security vulnerability is patched in a timely manner, apart from bringing other enhancements to the engine. The project will also continue taking public contributions.

    As the team learns from the move to support and contribute to Chromium and V8, we’ll keep the community informed about our progress and adjustments, if any, that we’ll need to make.

    ChakraCore team

    opened by liminzhu 44
  • rename /lib/ files to CamelCase

    rename /lib/ files to CamelCase

    We had a mix of inconsistent file name styles. This creates problems on Linux as we had to modify source code includes to the same casing as real file names. This change attempts rename (most) /lib/ files to CamelCase.

    lib/Backend                         =>  Lib/Backend
         BackEnd.cpp                             Backend.cpp
         BackEnd.h                               Backend.h
         BackEndOpcodeAttrAsmJs.cpp              BackendOpCodeAttrAsmJs.cpp
         BackEndOpcodeAttrAsmJs.h                BackendOpCodeAttrAsmJs.h
         BackEndOpCodeList.h                     BackendOpCodeList.h
         CodegenNumberAllocator.cpp              CodeGenNumberAllocator.cpp
         GlobOptBailout.cpp                      GlobOptBailOut.cpp
         SCCLiveness.cpp                         SccLiveness.cpp
         SCCLiveness.h                           SccLiveness.h
    lib/Backend/amd64                   =>  Lib/Backend/amd64
         MdOpcodes.h                             MdOpCodes.h
    lib/Backend/arm                     =>  Lib/Backend/arm
         MdOpcodes.h                             MdOpCodes.h
    lib/Backend/arm64                   =>  Lib/Backend/arm64
         MdOpcodes.h                             MdOpCodes.h
    lib/Backend/i386                    =>  Lib/Backend/i386
         MdOpcodes.h                             MdOpCodes.h
    lib/common                          =>  Lib/Common
         BackEndAPI.h                            BackendApi.h
         commoninl.h                             CommonInl.h
         resource.h                              Resource.h
    lib/common/common                   =>  Lib/Common/Common
         cfglogger.cpp                           CfgLogger.cpp
         cfglogger.h                             CfgLogger.h
         GetCurrentFrameID.h                     GetCurrentFrameId.h
         int16math.h                             Int16Math.h
         SmartFPUControl.cpp                     SmartFpuControl.cpp
         SmartFPUControl.h                       SmartFpuControl.h
    lib/common/core                     =>  Lib/Common/Core
         api.h                                   Api.h
         AutoFILE.h                              AutoFile.h
    lib/common/DataStructures           =>  Lib/Common/DataStructures
         comparer.h                              Comparer.h
         dictionary.h                            Dictionary.h
         Dlist.h                                 DList.h
         growingArray.cpp                        GrowingArray.cpp
         growingArray.h                          GrowingArray.h
         interval.h                              Interval.h
         list.h                                  List.h
         stack.h                                 Stack.h
    lib/common/Exceptions               =>  Lib/Common/Exceptions
         reporterror.cpp                         ReportError.cpp
         reporterror.h                           ReportError.h
    lib/common/Memory                   =>  Lib/Common/Memory
         collectionstate.h                       CollectionState.h
         heapblock.inl                           HeapBlock.inl
         heapbucket.cpp                          HeapBucket.cpp
         heapbucket.h                            HeapBucket.h
         heapbucket.inl                          HeapBucket.inl
         heapinfo.cpp                            HeapInfo.cpp
         heapinfo.h                              HeapInfo.h
         leakreport.cpp                          LeakReport.cpp
         leakreport.h                            LeakReport.h
    lib/common/util                     =>  Lib/Common/Util
         pinned.cpp                              Pinned.cpp
         pinned.h                                Pinned.h
    lib/jsrt                            =>  Lib/Jsrt
         chakracommon.h                          ChakraCommon.h
         jsrtcontext.cpp                         JsrtContext.cpp
         jsrtcontext.h                           JsrtContext.h
         jsrtExternalObject.cpp                  JsrtExternalObject.cpp
         jsrtExternalObject.h                    JsrtExternalObject.h
         jsrtinternal.h                          JsrtInternal.h
         jsrtRuntime.cpp                         JsrtRuntime.cpp
         jsrtRuntime.h                           JsrtRuntime.h
         jsrtThreadService.cpp                   JsrtThreadService.cpp
         jsrtThreadService.h                     JsrtThreadService.h
    lib/Parser                          =>  Lib/Parser
         alloc.cpp                               Alloc.cpp
         alloc.h                                 Alloc.h
         hash.cpp                                Hash.cpp
         hash.h                                  Hash.h
         hashfunc.cpp                            HashFunc.cpp
         jsscan.js                               JsScan.js
         parse.cpp                               Parse.cpp
         parse.h                                 Parse.h
         regcodes.h                              RegCodes.h
         RegexOpcodes.h                          RegexOpCodes.h
         RegexRunTime.cpp                        RegexRuntime.cpp
         RegexRunTime.h                          RegexRuntime.h
         scan.cpp                                Scan.cpp
         scan.h                                  Scan.h
    lib/Runtime/Base                    =>  Lib/Runtime/Base
         scriptcontextbase.h                     ScriptContextBase.h
         ThreadContextTLSEntry.cpp               ThreadContextTlsEntry.cpp
         ThreadContextTLSEntry.h                 ThreadContextTlsEntry.h
         threadservicewrapper.h                  ThreadServiceWrapper.h
    lib/Runtime/ByteCode                =>  Lib/Runtime/ByteCode
         AsmJSByteCodeDumper.cpp                 AsmJsByteCodeDumper.cpp
         AsmJSByteCodeDumper.h                   AsmJsByteCodeDumper.h
         BackEndOpcodeAttr.cpp                   BackendOpCodeAttr.cpp
         BackEndOpcodeAttr.h                     BackendOpCodeAttr.h
         ByteCodeAPI.h                           ByteCodeApi.h
         byteCodeCacheReleaseFileVersion.h       ByteCodeCacheReleaseFileVersion.h
         Opcodes.cpp                             OpCodes.cpp
    lib/Runtime/Language                =>  Lib/Runtime/Language
         asmjs.cpp                               AsmJs.cpp
         AsmJS.h                                 AsmJs.h
         AsmJsBuiltinNames.h                     AsmJsBuiltInNames.h
         AsmJSBytecodeGenerator.cpp              AsmJsByteCodeGenerator.cpp
         AsmJSBytecodeGenerator.h                AsmJsByteCodeGenerator.h
         AsmJSCodeGenerator.cpp                  AsmJsCodeGenerator.cpp
         AsmJSCodeGenerator.h                    AsmJsCodeGenerator.h
         AsmJSEncoder.cpp                        AsmJsEncoder.cpp
         AsmJSEncoder.h                          AsmJsEncoder.h
         AsmJSEncoder.inl                        AsmJsEncoder.inl
         AsmJSEncoderHandler.inl                 AsmJsEncoderHandler.inl
         AsmJSJitTemplate.h                      AsmJsJitTemplate.h
         AsmJSLink.cpp                           AsmJsLink.cpp
         AsmJSLink.h                             AsmJsLink.h
         AsmJSModule.cpp                         AsmJsModule.cpp
         AsmJSModule.h                           AsmJsModule.h
         AsmJSTypes.cpp                          AsmJsTypes.cpp
         AsmJSTypes.h                            AsmJsTypes.h
         AsmJSUtils.cpp                          AsmJsUtils.cpp
         AsmJSUtils.h                            AsmJsUtils.h
         SIMDBool16x8Operation.cpp               SimdBool16x8Operation.cpp
         SIMDBool16x8Operation.h                 SimdBool16x8Operation.h
         SIMDBool16x8OperationX86X64.cpp         SimdBool16x8OperationX86X64.cpp
         SIMDBool32x4Operation.cpp               SimdBool32x4Operation.cpp
         SIMDBool32x4Operation.h                 SimdBool32x4Operation.h
         SIMDBool32x4OperationX86X64.cpp         SimdBool32x4OperationX86X64.cpp
         SIMDBool8x16Operation.cpp               SimdBool8x16Operation.cpp
         SIMDBool8x16Operation.h                 SimdBool8x16Operation.h
         SIMDBool8x16OperationX86X64.cpp         SimdBool8x16OperationX86X64.cpp
         SIMDFloat32x4Operation.cpp              SimdFloat32x4Operation.cpp
         SIMDFloat32x4Operation.h                SimdFloat32x4Operation.h
         SIMDfloat32x4OperationX86X64.cpp        SimdFloat32x4OperationX86X64.cpp
         SIMDFloat64x2Operation.cpp              SimdFloat64x2Operation.cpp
         SIMDFloat64x2Operation.h                SimdFloat64x2Operation.h
         SIMDfloat64x2OperationX86X64.cpp        SimdFloat64x2OperationX86X64.cpp
         SIMDInt16x8Operation.cpp                SimdInt16x8Operation.cpp
         SIMDInt16x8Operation.h                  SimdInt16x8Operation.h
         SIMDInt16x8OperationX86X64.cpp          SimdInt16x8OperationX86X64.cpp
         SIMDInt32x4Operation.cpp                SimdInt32x4Operation.cpp
         SIMDInt32x4Operation.h                  SimdInt32x4Operation.h
         SIMDInt32x4OperationX86X64.cpp          SimdInt32x4OperationX86X64.cpp
         SIMDInt8x16Operation.cpp                SimdInt8x16Operation.cpp
         SIMDInt8x16Operation.h                  SimdInt8x16Operation.h
         SIMDInt8x16OperationX86X64.cpp          SimdInt8x16OperationX86X64.cpp
         SIMDUint16x8Operation.cpp               SimdUint16x8Operation.cpp
         SIMDUint16x8Operation.h                 SimdUint16x8Operation.h
         SIMDUint16x8OperationX86X64.cpp         SimdUint16x8OperationX86X64.cpp
         SIMDUInt32x4Operation.cpp               SimdUint32x4Operation.cpp
         SIMDUInt32x4Operation.h                 SimdUint32x4Operation.h
         SIMDUInt32x4OperationX86X64.cpp         SimdUint32x4OperationX86X64.cpp
         SIMDUint8x16Operation.cpp               SimdUint8x16Operation.cpp
         SIMDUint8x16Operation.h                 SimdUint8x16Operation.h
         SIMDUint8x16OperationX86X64.cpp         SimdUint8x16OperationX86X64.cpp
         SIMDUtils.cpp                           SimdUtils.cpp
         SIMDUtils.h                             SimdUtils.h
    lib/Runtime/Language/amd64          =>  Lib/Runtime/Language/amd64
         AsmJSJitTemplate.cpp                    AsmJsJitTemplate.cpp
         stackframe.cpp                          StackFrame.cpp
         stackframe.h                            StackFrame.h
         stackframe.inl                          StackFrame.inl
    lib/Runtime/Language/arm            =>  Lib/Runtime/Language/arm
         stackframe.cpp                          StackFrame.cpp
         stackframe.h                            StackFrame.h
    lib/Runtime/Language/arm64          =>  Lib/Runtime/Language/arm64
         stackframe.cpp                          StackFrame.cpp
         stackframe.h                            StackFrame.h
    lib/Runtime/Language/i386           =>  Lib/Runtime/Language/i386
         AsmJSJitTemplate.cpp                    AsmJsJitTemplate.cpp
         stackframe.cpp                          StackFrame.cpp
         stackframe.h                            StackFrame.h
    lib/Runtime/Library                 =>  Lib/Runtime/Library
         dataview.cpp                            DataView.cpp
         dataview.h                              DataView.h
         JavascriptSIMDBool16x8.cpp              JavascriptSimdBool16x8.cpp
         JavascriptSIMDBool16x8.h                JavascriptSimdBool16x8.h
         JavascriptSIMDBool32x4.cpp              JavascriptSimdBool32x4.cpp
         JavascriptSIMDBool32x4.h                JavascriptSimdBool32x4.h
         JavascriptSIMDBool8x16.cpp              JavascriptSimdBool8x16.cpp
         JavascriptSIMDBool8x16.h                JavascriptSimdBool8x16.h
         JavascriptSIMDFloat32x4.cpp             JavascriptSimdFloat32x4.cpp
         JavascriptSIMDFloat32x4.h               JavascriptSimdFloat32x4.h
         JavascriptSIMDFloat64x2.cpp             JavascriptSimdFloat64x2.cpp
         JavascriptSIMDFloat64x2.h               JavascriptSimdFloat64x2.h
         JavascriptSIMDInt16x8.cpp               JavascriptSimdInt16x8.cpp
         JavascriptSIMDInt16x8.h                 JavascriptSimdInt16x8.h
         JavascriptSIMDInt32x4.cpp               JavascriptSimdInt32x4.cpp
         JavascriptSIMDInt32x4.h                 JavascriptSimdInt32x4.h
         JavascriptSIMDInt8x16.cpp               JavascriptSimdInt8x16.cpp
         JavascriptSIMDInt8x16.h                 JavascriptSimdInt8x16.h
         JavascriptSIMDUint16x8.cpp              JavascriptSimdUint16x8.cpp
         JavascriptSIMDUint16x8.h                JavascriptSimdUint16x8.h
         JavascriptSIMDUInt32x4.cpp              JavascriptSimdUint32x4.cpp
         JavascriptSIMDUInt32x4.h                JavascriptSimdUint32x4.h
         JavascriptSIMDUint8x16.cpp              JavascriptSimdUint8x16.cpp
         JavascriptSIMDUint8x16.h                JavascriptSimdUint8x16.h
         javascripttypednumber.cpp               JavascriptTypedNumber.cpp
         javascripttypednumber.h                 JavascriptTypedNumber.h
         moduleroot.cpp                          ModuleRoot.cpp
         moduleroot.h                            ModuleRoot.h
         SIMDBool16x8Lib.cpp                     SimdBool16x8Lib.cpp
         SIMDBool16x8Lib.h                       SimdBool16x8Lib.h
         SIMDBool32x4Lib.cpp                     SimdBool32x4Lib.cpp
         SIMDBool32x4Lib.h                       SimdBool32x4Lib.h
         SIMDBool8x16Lib.cpp                     SimdBool8x16Lib.cpp
         SIMDBool8x16Lib.h                       SimdBool8x16Lib.h
         SIMDFloat32x4Lib.cpp                    SimdFloat32x4Lib.cpp
         SIMDFloat32x4Lib.h                      SimdFloat32x4Lib.h
         SIMDFloat64x2Lib.cpp                    SimdFloat64x2Lib.cpp
         SIMDFloat64x2Lib.h                      SimdFloat64x2Lib.h
         SIMDInt16x8Lib.cpp                      SimdInt16x8Lib.cpp
         SIMDInt16x8Lib.h                        SimdInt16x8Lib.h
         SIMDInt32x4Lib.cpp                      SimdInt32x4Lib.cpp
         SIMDInt32x4Lib.h                        SimdInt32x4Lib.h
         SIMDInt8x16Lib.cpp                      SimdInt8x16Lib.cpp
         SIMDInt8x16Lib.h                        SimdInt8x16Lib.h
         SIMDUint16x8Lib.cpp                     SimdUint16x8Lib.cpp
         SIMDUint16x8Lib.h                       SimdUint16x8Lib.h
         SIMDUInt32x4Lib.cpp                     SimdUint32x4Lib.cpp
         SIMDUInt32x4Lib.h                       SimdUint32x4Lib.h
         SIMDUint8x16Lib.cpp                     SimdUint8x16Lib.cpp
         SIMDUint8x16Lib.h                       SimdUint8x16Lib.h
         typedArrayEnumerator.cpp                TypedArrayEnumerator.cpp
         typedArrayEnumerator.h                  TypedArrayEnumerator.h
    lib/Runtime/Library/amd64           =>  Lib/Runtime/Library/amd64
         javascriptfunctiona.asm                 JavascriptFunctionA.asm
    lib/Runtime/Library/InJavascript    =>  Lib/Runtime/Library/InJavascript
         intl.js.bc.32b.h                        Intl.js.bc.32b.h
         intl.js.bc.64b.h                        Intl.js.bc.64b.h
    opened by jianchun 40
  • Fix debugger ignoring exceptions thrown after an await

    Fix debugger ignoring exceptions thrown after an await

    If code such as the snippet below is run under the debugger, the host is not notified of the thrown exception via JsDiagDebugEventRuntimeException:

    (async () => {
        await null;
        throw new Error();

    Note that moving the throw before the await makes the debugger able to intercept it again. This issue occurs because of an AutoCatchHandlerExists being in scope when the promise reaction is run:

    The fix is to not construct an AutoCatchHandlerExists in this situation. While the exception is indeed caught and squelched, it's not actually swallowed but converted to a promise rejection, which may well be fatal depending on the host. We need the debugger to be able to intercept it before that happens so the user can view the callstack, variables, etc. before the stack is unwound.

    There is no test coverage for this yet, I will try to add some in the next day or so.

    Fixes #4630.

    External Contributor 
    opened by fatcerberus 38
  • returns the function itself instead of the real return value returns the function itself instead of the real return value

    I have convinced myself, that I am looking at an optimization issue in EdgeHTML 14. The most annoying part is, that it doesn't reproduce when the F12 tools are open.

    I'm building an application including the new d3 version 4, angular2, and core-js' es6 modules (amongst other things). Everything is bundled with webpack. I have tried to reduce the problem by editing the webpack-generated JavaScript and removing some of the moving parts, but that seems to fix it. I'll try to describe my environment, some code snippets etc., but I wouldn't expect this to be easy to reproduce.

    The problem appears in the range function, more exactly in the range = assignment in the first branch. slice is imported from array.js and is just Array.prototype.slice.

    The first three times this function gets called (when arguments.length === 1, an array with two elements), the .call(_) returns the expected copy of that array. The fourth time, range gets function slice() { [native code] } assigned instead.

    With webpack in the picture, here is what the browser actually executes:

    /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__array__ = __webpack_require__(22);
    // […]
      scale.range = function(_) {
        return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__["a" /* slice */].call(_), rescale()) : range.slice();

    or my debug version:

      scale.range = function (_) {
          var result;
          if (arguments.length) {
              range = __WEBPACK_IMPORTED_MODULE_2__array__["a" /* slice */].call(_);
              result = rescale();
          else {
              result = range.slice();
          return result;

    I have rerouted console.log() and console.error() to append the logs to a DOM element, so I have a chance to see what happened when I open the F12 tools after things blew up. The log is:

    Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
    function slice() { [native code] }

    Continuing the program executing then runs into an exception when the range function is called without arguments:

    TypeError: Object doesn't support property or method 'slice'
      at scale.range (…)
      at …

    I have verified, that the webpack imported slice function is always the same. I have tried to inline the webpack infrastructure, but that fixes the problem. The same code works beautifully in Chrome. The code works (much slower) when the F12 are open.


    Fixed Bug 
    opened by Tragetaschen 33
  • Implementation of Object.getOwnPropertyDescriptors.

    Implementation of Object.getOwnPropertyDescriptors.

    Fixes #254

    This is a rough implementation based on a combination of getOwnPropertyDescriptor as a reference, and what I could intuit from a day of digging.

    I'd appreciate as much feedback as possible on how I did this. I used existing functions I was aware of when possible, but if there are better choices of helper functions here, please do let me know. I also did the tests all in javascript (similar to what I could find on getOwnPropertyDescriptor), and tried to make them as thorough as possible.

    opened by j-wing 33
  • ch: Get error string from exception when error `stack` is undefined

    ch: Get error string from exception when error `stack` is undefined

    When out of memory happens, exception value reference doesn’t have a stack property or stack is undefined.

    This update converts exception value reference to string in such case to produce a meaningful output.

    To test the issue, run script below with ch:

    var arr = [];
    for(var i=0;i<1e9;i++)
     arr[i]  = i%9;
    print(“-> " + arr[]);
    opened by obastemur 33
  • [Discussion] Linux / Cross-platform planning

    [Discussion] Linux / Cross-platform planning

    This is for general discussions on the cross-platfrom effort. Please open individual issues for tasks clearly identified from this discussion, or PRs if they are small and you can do them quickly.

    Please see the Roadmap for our cross-platform checklist and progress.

    Related issues:

    • [ ] #197
    • [ ] #198
    • [ ] #200

    See for some examples of work items we might want to consider.

    Discussion Linux 
    opened by dilijev 31
  • icu-intl: Ubuntu 14LTS build break

    icu-intl: Ubuntu 14LTS build break

    We have icu-intl is enabled by default now. ICU-intl impl. uses couple of ICU API those are not available on ICU 52. Although we don't say we officially support any of these, we could simply feature detect and pick API we can use and keep the number of platforms we support.

    IMHO we shouldn't break our default build with Ubuntu 14LTS

    Linux Intl-ICU 
    opened by obastemur 29
  • Throw `TypeError` if `[[DefineOwnProperty]]` returns false

    Throw `TypeError` if `[[DefineOwnProperty]]` returns false


    According to es spec Object.defineProperty should throw if internal [[DefineOwnProperty]] returns false-ish. This happens specifically if the defineProperty proxy trap returns false (See #6505).


    • Throw TypeError in JavascriptObject::EntryDefineProperty if DefineOwnPropertyHelper returns false-ish
    • Changed content of JSERR_ProxyHandlerReturnedFalse
    • Routed PropertyOperationFlags through the call stack

    Open questions

    • Why is test\Bugs\misc_bugs.js tagged with exclude_windows?


    Related to PR #5412 Fixes #6505

    opened by ShortDevelopment 0
  • Debugging ChakraCore : Boolean valueOf

    Debugging ChakraCore : Boolean valueOf

    I am using Visual Studio 2015.

    When I try to debug my application, it does not step into the Chakra code - I have built the Chakra solution on the same machine and the Debug Output window indicates that the symbols for ChakraCore.dll have been loaded.

    If I locate the source file in chakra where a particular function is, and put a break point there, the debugger does stop there and lets me debug the code .. different matter that debugging c++ is not easy for me.

    I had to debug in the context of an issue .. a script was passing a native function a boolean object where a boolean value was expected. The native function determined that that argument was an instance of the Boolean object and so tried to convert that to the boolean value ..

    Tried with ConvertValueToBoolean - that always returns a value of false. Tried calling the valueOf function of the Boolean object - that returns an object and not a value. But ConvertValueToString returns the correct value.

    Thanks K

    opened by bkimman 2
  • [C++20/DR] Fix compile error for equality in rewrite expressions

    [C++20/DR] Fix compile error for equality in rewrite expressions

    After the MSVC team implemented P2468R2 The Equality Operator You Are Looking For, we got an error compiling ChakraCore with /std:c++latest on MSVC, now it is fixed.

    Error message: F:\gitP\microsoft\ChakraCore\lib\Runtime\Language\SimdUtils.h(70,16): error C2666: '_SIMDValue::operator ==': overloaded functions have similar conversions F:\gitP\microsoft\ChakraCore\lib\Runtime\Language\SimdUtils.h(48,10): note: could be 'bool _SIMDValue::operator ==(const _SIMDValue &)' C:\Program Files (x86)\Windows Kits\10\include\10.0.22618.0\shared\guiddef.h(192,15): note: or 'bool operator ==(const GUID &,const GUID &)' F:\gitP\microsoft\ChakraCore\lib\Runtime\Language\SimdUtils.h(48,10): note: or 'bool _SIMDValue::operator ==(const _SIMDValue &)' [synthesized expression 'y == x'] C:\Program Files (x86)\Windows Kits\10\include\10.0.22618.0\shared\guiddef.h(192,15): note: or 'bool operator ==(const GUID &,const GUID &)' [synthesized expression 'y == x'] F:\gitP\microsoft\ChakraCore\lib\Runtime\Language\SimdUtils.h(70,16): note: while trying to match the argument list '(_SIMDValue, _SIMDValue)'

    opened by QuellaZhang 2
  • Support lacking for Apple Silicon (ARM)

    Support lacking for Apple Silicon (ARM)

    On ARM macOS (all versions), ./ --icu=/opt/homebrew/opt/icu4c/include -j=4 -y --lto-thin leads to:

    CMake Error at CMakeLists.txt:47 (message):
        Couldn't detect target processor, try `--arch` argument with
    opened by fxcoudert 9
  • Invalidate `IsInstInlineCache` in `Object.setPrototypeOf`

    Invalidate `IsInstInlineCache` in `Object.setPrototypeOf`

    Using Object.setPrototypeOf may result in instanceof returning the wrong result, as the IsInstInlineCache is not invalidated (See #5915).


    • Iterate over the existing function -> IsInstInlineCache[] dictionary using the new ThreadContext.MapIsInstInlineCaches function
    • Walk the prototype chain to check for the cached type
    • Ignore if type is null
    • If found, remove from list using ThreadContext.UnregisterIsInstInlineCache (corrects next) and ...
    • Invalidate using memset

    I couldn't come up with a scenario where the function could be affected (x instance of function). Therefore, the following code should not be necessary (not included in latest commit):


    Fixes #5915

    opened by ShortDevelopment 9
  • Deprecation of `Ubuntu 18.04` Actions (DevOps)

    Deprecation of `Ubuntu 18.04` Actions (DevOps)

    Ubuntu18 tests will already fail during scheduled brownout. They will be fully unsupported by 4/1/2023.

    See, #6831. PR:

    opened by ShortDevelopment 2
Embedded JavaScript engine for C/C++

V7: Embedded JavaScript engine NOTE: this project is deprecated in favor of V7 is the smallest JavaScript engine writte

Cesanta Software 1.4k Dec 29, 2022
:sparkles: Magical headers that make your C++ library accessible from JavaScript :rocket:

Quick start | Requirements | Features | User guide | Contributing | License nbind is a set of headers that make your C++11 library accessible from Jav

charto 1.9k Dec 26, 2022
Structy is an irresponsibly dumb and simple struct serialization/deserialization library for C, Python, and vanilla JavaScript.

Structy Structy is an irresponsibly dumb and simple struct serialization/deserialization library for C, Python, and vanilla JavaScript. You can think

Stargirl Flowers 53 Dec 29, 2022
C++11 API for creating Lua bindings

=head1 NAME luacxx - C++11 binding and modules for Lua =head1 SYNOPSIS // Create a new Lua environment to play with. auto env = lua::create

Aaron Faanes 148 Nov 14, 2022
Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:

sol2 sol2 is a C++ library binding to Lua. It currently supports all Lua versions 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use

The Phantom Derpstorm 3.3k Jan 4, 2023
Generates CIL MLIR dialect from C/C++ source.

Build steps -DLLVM_ENABLE_PROJECTS="mlir;clang" in cmake ninja cml should build the cml clang tool ninja check-clang-cml to run the CIL tests. Check c

Compiler Tree Technologies 27 Dec 11, 2022
ChakraCore bindings for aardio

ChakraCore-bindings-for-aardio ChakraCore is a Javascript engine with a C API you can use to add support for Javascript to any C or C compatible proje

null 9 Feb 18, 2022
The Atomic Game Engine is a multi-platform 2D and 3D engine with a consistent API in C++, C#, JavaScript, and TypeScript

The Atomic Game Engine is a multi-platform 2D and 3D engine with a consistent API in C++, C#, JavaScript, and TypeScript

null 2.8k Dec 29, 2022
Vizzu is a free, open-source Javascript/C++ library for animated data visualizations and data stories.

Vizzu is a free, open-source Javascript/C++ library utilizing a generic dataviz engine that generates many types of charts and seamlessly animates between them

Vizzu 1.6k Jan 3, 2023
Window.js is an open-source Javascript runtime for desktop graphics programming.

Window.js Window.js is an open-source Javascript runtime for desktop graphics programming. It is documented at Introduction Window.js pr

Window.js 2.2k Dec 31, 2022
High level HTTP Request Library that gives a javascript fetch like API.

Fetch for Arduino fetch is a high level HTTP Request Library that gives you a javascript fetch like API. ResponseOptions options; options.method = "PO 67 Dec 28, 2022
Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform AAA Open 3D Engine

Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.

O3DE 5.8k Jan 7, 2023
MAZE (My AmaZing Engine) - 🎮 Personal open-source cross-platform game engine

MAZE (My AmaZing Engine) is the self-written open-source cross-platform game engine in the active development stage. At the moment it is my main pet project, developed for the purpose of learning and preserving different game dev technologies.

Dmitriy Nosov 13 Dec 14, 2022
OpenMW is an open-source open-world RPG game engine that supports playing Morrowind.

OpenMW is an open-source open-world RPG game engine that supports playing Morrowind.

null 4.5k Jan 2, 2023
Duktape - embeddable Javascript engine with a focus on portability and compact footprint

Duktape ⚠️ Master branch is undergoing incompatible changes for Duktape 3.x. To track Duktape 2.x, follow the v2-maintenance branch. Introduction Dukt

Sami Vaarala 5.5k Jan 6, 2023
Embedded JavaScript engine for C/C++

V7: Embedded JavaScript engine NOTE: this project is deprecated in favor of V7 is the smallest JavaScript engine writte

Cesanta Software 1.4k Dec 29, 2022
Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6

Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6. It is designed for microcontroller development. Instead of writing firmware code in C/C++, Elk allows to develop in JavaScript. Another use case is providing customers with a secure, protected scripting environment for product customisation.

Cesanta Software 1.5k Jan 8, 2023
Android Bindings for QuickJS, A fine little javascript engine.

quickjs-android quickjs-android 是 QuickJS JavaScript 引擎的 Android 接口框架,整体基于面向对象设计,提供了自动GC功能,使用简单。armeabi-v7a 的大小仅 350KB,是 Google V8 不错的替代品,启动速度比 V8 快,内

Wiki 121 Dec 28, 2022
Header-only ECMAScript (JavaScript) compatible regular expression engine

SRELL (std::regex-like library) is a regular expression template library for C++ and has native support for UTF-8, UTF-16, and UTF-32. This is up-to-d

Dmitry Atamanov 4 Mar 11, 2022
Embedded JavaScript engine for C/C++

mJS: Restricted JavaScript engine Overview mJS is designed for microcontrollers with limited resources. Main design goals are: small footprint and sim

Cesanta Software 1.7k Dec 30, 2022