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

Overview

ChakraCore

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.

Security

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.

Documentation

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 https://github.com/Microsoft/ChakraCore.git
  • 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

Contribute

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

Please refer to Contribution Guidelines for more details.

License

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
Issues
  • 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

    brand:

    • ForceES5Array

    grammar:

    • 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

    Whitespace

    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

    Discussion 
    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 https://github.com/Microsoft/ChakraCore/blob/JsRTDebugging/lib/Jsrt/ChakraDebug.h and provide any feedback you have.

    Discussion 
    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

    Discussion 
    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: https://github.com/Microsoft/ChakraCore/blob/ad79be8811806622190b55266c73f20b600ed46c/lib/Runtime/Library/JavascriptPromise.cpp#L1037-L1051

    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
  • 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
  • Function.prototype.call returns the function itself instead of the real return value

    Function.prototype.call 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 = slice.call(_) 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) {
              console.log('change!');
              console.log(range);
              range = __WEBPACK_IMPORTED_MODULE_2__array__["a" /* slice */].call(_);
              console.log(range);
              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.
    change!
    0,1
    278.3333333333333,0
    change!
    0,1
    0,885
    change!
    0,1
    278.3333333333333,0
    change!
    0,1
    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.

    Help!

    Fixed Bug 
    opened by Tragetaschen 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[Date.now()%1e9]);
    
    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 https://github.com/caitp/ChakraCore/issues/1 for some examples of work items we might want to consider.

    Discussion Linux 
    opened by dilijev 31
Releases(v1.11.24)
Embedded JavaScript engine for C/C++

V7: Embedded JavaScript engine NOTE: this project is deprecated in favor of https://github.com/cesanta/mjs V7 is the smallest JavaScript engine writte

Cesanta Software 1.3k Dec 1, 2021
: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.8k Dec 2, 2021
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 43 Nov 15, 2021
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 137 Nov 20, 2021
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 2.8k Dec 3, 2021
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 19 Nov 15, 2021
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 8 Oct 19, 2021
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 708 Nov 30, 2021
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 4k Dec 6, 2021
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 11 Dec 6, 2021
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 4k Nov 29, 2021
Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified source engine as well as their Easy Anti Cheat Implementation.

Apex-Legends-SDK Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified sou

null 10 Nov 29, 2021
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.1k Dec 7, 2021
Embedded JavaScript engine for C/C++

V7: Embedded JavaScript engine NOTE: this project is deprecated in favor of https://github.com/cesanta/mjs V7 is the smallest JavaScript engine writte

Cesanta Software 1.3k Dec 1, 2021
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.2k Dec 7, 2021
Android Bindings for QuickJS, A fine little javascript engine.

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

Wiki 41 Dec 3, 2021
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 2 Oct 25, 2021
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.

Copyright (c) 2000, 2021, Oracle and/or its affiliates. This is a release of MySQL, an SQL database server. License information can be found in the

MySQL 7.2k Dec 7, 2021
This is a list of different open-source video games and commercial video games open-source remakes.

This is a list of different open-source video games and commercial video games open-source remakes.

Ivan Bobev 30 Nov 14, 2021
Parsec Soda is a custom open-source game streaming app that integrates with Parsec API and is focused in Host experience.

Parsec Soda is a custom open-source game streaming app that integrates with Parsec API and is focused in Host experience.

Flávio Freitas 47 Nov 28, 2021
log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration. It is modelled after the Java log4j API.

% log4cplus README Short Description log4cplus is a simple to use C++17 logging API providing thread--safe, flexible, and arbitrarily granular control

null 1.2k Nov 29, 2021
The Telegram Bot API provides an HTTP API for creating Telegram Bots.

The Telegram Bot API provides an HTTP API for creating Telegram Bots.

Telegram Library 1.4k Dec 2, 2021
The goal of arrowvctrs is to wrap the Arrow Data C API and Arrow Stream C API to provide lightweight Arrow support for R packages

The goal of arrowvctrs is to wrap the Arrow Data C API and Arrow Stream C API to provide lightweight Arrow support for R packages to consume and produce streams of data in Arrow format. Right now it’s just a fun way for me to learn about Arrow!

Dewey Dunnington 16 Nov 30, 2021
Simple-MySQL-API is a free and easy API to manipulate MySQL with C99 and GCC compiler under GNU/Linux OS.

Simple-MySQL-API is a free and easy API to manipulate MySQL with C99 and GCC compiler under GNU/Linux OS.

Neptune 3 Nov 29, 2021
Open-source, cross-platform, C++ game engine for creating 2D/3D games.

GamePlay v3.0.0 GamePlay is an open-source, cross-platform, C++ game framework/engine for creating 2D/3D mobile and desktop games. Website Wiki API De

gameplay3d 3.4k Dec 7, 2021
KlayGE is a cross-platform open source game engine with plugin-based architecture.

KlayGE KlayGE is a cross-platform open source game engine with plugin-based architecture. It's started since 2003. The explicit goal of KlayGE is: to

Minmin Gong 1.6k Dec 6, 2021
Powerful, mature open-source cross-platform game engine for Python and C++, developed by Disney and CMU

Panda3D Panda3D is a game engine, a framework for 3D rendering and game development for Python and C++ programs. Panda3D is open-source and free for a

Panda3D 3k Nov 28, 2021
MIT Licensed Open Source version of Torque 2D game engine from GarageGames

We've moved! All torque engines have moved to a new organization, Torque Game Engines. Torque2D can be found at https://github.com/TorqueGameEngines/T

GarageGames 1.7k Nov 23, 2021
RakNet is a cross platform, open source, C++ networking engine for game programmers.

RakNet 4.081 Copyright (c) 2014, Oculus VR, Inc. Package notes The Help directory contains index.html, which is full help documentation in HTML format

Facebook Archive 3k Nov 24, 2021