GithubHelp home page GithubHelp logo

bhanditz / node-chakracore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nodejs/node-chakracore

0.0 1.0 0.0 420.13 MB

Node.js on ChakraCore :sparkles::turtle::rocket::sparkles:

License: Other

JavaScript 58.31% Makefile 0.32% Shell 0.22% R 0.05% HTML 1.21% C++ 20.69% Python 15.11% C 3.24% DTrace 0.28% Roff 0.08% Batchfile 0.29% Emacs Lisp 0.11% Perl 0.09%

node-chakracore's Introduction

Node.js on ChakraCore

This project enables Node.js to optionally use the ChakraCore JavaScript engine. This project is still work in progress and not an officially supported Node.js branch. For more context into this project, please refer to the original PR.

How it works

To enable building and running Node.js with the ChakraCore JavaScript engine, a V8 API shim (ChakraShim) is created on top of the ChakraCore runtime hosting API (JSRT. ChakraShim implements the most essential V8 APIs so that the underlying JavaScript engine change is transparent to Node.js and other native addon modules written for V8.

A rebuild of node and native addon modules with ChakraCore is required for this to work.

Time Travel Debugging

Time-Travel debugging is an exciting new addition to Node.js debugging, first introduced in Node-ChakraCore, and now supported by VSCode. We are developing in the open and want to share our progress to get feedback, bug reports, functionality requests, and pull-requests from the community.

Check out this Time-Travel Debugging page to learn how to get started with TTD on Node-ChakraCore with VSCode.

Node.js API (NAPI)

Node-ChakraCore is an active participant in the ABI-Stable-Node project also called NAPI. The goal of this project is to ease the lives of native add-ons developers, by providing a stable Node API which also guarantees stable ABI across disparate Node versions. This allows native modules to just work across different versions and flavors of Node.js without recompilations, reducing the maintenance cost for module developers and thus improving compatibility.

Head over to the NAPI Project repo to learn more about it and ways to get involved.

Installing prebuilt Node-ChakraCore binaries

You can download and install stable prebuilt Node-ChakraCore from the releases page.

For installing Node-ChakraCore side-by-side your existing Node installation, we recommend Node Version Switcher (NVS).

$ nvs remote chakracore https://nodejs.org/download/chakracore-release/
$ nvs add chakracore/latest
$ nvs use chakracore

Nightly builds of Node-ChakraCore are available at https://nodejs.org/download/chakracore-nightly/ Please use the following instructions to install the nightly builds.

$ nvs remote chakracore-nightly https://nodejs.org/download/chakracore-nightly/
$ nvs add chakracore-nightly/latest
$ nvs use chakracore-nightly

Building Node-ChakraCore

Node-ChakraCore can be built on Windows, Linux, and macOS.

If you are looking to build this yourself, here's what you will need.

Windows

Prerequisites:

Build Command:

> vcbuild [x86|x64|arm]

To run unit tests

> vcbuild nobuild test ignore-flaky [x86|x64|arm]

To test if Node.js was built correctly with ChakraCore:

> node -e "console.log('Hello from Node.js ' + process.jsEngine)"
Hello from Node.js chakracore

Linux

Install building tools and ChakraCore dependencies: Clang 3.7+ / CMake 3.2 are required

Debian/Ubuntu:

$ sudo apt-get install -y build-essential cmake clang libicu-dev

Fedora:

$ su
$ dnf group install -y "Development Tools" "C Development Tools and Libraries"
$ dnf install -y git cmake clang gcc gcc-c++ kernel-devel python llvm
$ dnf install -y lttng-ust-devel.x86_64 libicu-devel.x86_64 libstdc++-static.x86_64

Clone this repo and check out master branch:

$ git checkout master

Build:

$ ./configure
$ make

To run unit tests:

$ FLAKY_TESTS=dontcare make test

To test if Node.js was built correctly with ChakraCore:

$ node -e "console.log('Hello from Node.js ' + process.jsEngine)"
Hello from Node.js chakracore

macOS

Prerequisites:

Install the building tools:

$ xcode-select --install
$ brew install cmake

Clone this repo and check out master branch:

$ git checkout master

Build:

$ ./configure
$ make 

To test if Node.js was built correctly with ChakraCore:

$ ./node -e "console.log('Hello from Node.js ' + process.jsEngine)"
Hello from Node.js chakracore

Issues

Please report all issues related to Node-ChakraCore on our issues page.

node-chakracore's People

Contributors

addaleax avatar apapirovski avatar bnoordhuis avatar bridgear avatar chakrabot avatar cjihrig avatar danbev avatar evanlucas avatar fishrock123 avatar indutny avatar isaacs avatar jasnell avatar joyeecheung avatar kfarnung avatar koichik avatar mscdex avatar mylesborins avatar piscisaureus avatar refack avatar rvagg avatar ry avatar sam-github avatar shigeki avatar targos avatar tjfontaine avatar tniessen avatar tootallnate avatar trevnorris avatar trott avatar vsemozhetbyt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.