Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 471b930

Browse files
author
Jianchun Xu
committed
README: update to include Linux instructions
Add links to prebuilt binaries and Linux build instructions. Reflow long lines.
1 parent 9c7c47d commit 471b930

File tree

1 file changed

+57
-25
lines changed

1 file changed

+57
-25
lines changed

README.md

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,55 @@
11
Node.js on ChakraCore
2-
===
3-
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. Please refer to the original [PR](https://github.com/nodejs/node/pull/4765).
2+
=====================
3+
4+
This project enables Node.js to optionally use the ChakraCore JavaScript
5+
engine. This project is still **work in progress** and not an officially
6+
supported Node.js branch. Please refer to the original
7+
[PR] (https://github.com/nodejs/node/pull/4765).
48

59
### How it works
610

7-
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]
8-
(https://msdn.microsoft.com/en-us/library/dn249673(v=vs.94).aspx)). 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.
11+
To enable building and running Node.js with the ChakraCore JavaScript engine, a
12+
V8 API shim (ChakraShim) is created on top of the ChakraCore runtime hosting API
13+
([JSRT] (https://msdn.microsoft.com/en-us/library/dn249673(v=vs.94).aspx)).
14+
ChakraShim implements the most essential V8 APIs so that the underlying
15+
JavaScript engine change is transparent to Node.js and other native addon
16+
modules written for V8.
917

10-
A rebuild node.exe and native addon modules with ChakraCore is required for this to work.
18+
A rebuild of node and native addon modules with ChakraCore is required for this
19+
to work.
1120

1221
### Issues
13-
Please report all issues related to Node-ChakraCore on this separate [issue page](https://github.com/nodejs/node-chakracore/issues).
1422

15-
### Windows
23+
Please report all issues related to Node-ChakraCore on this separate
24+
[issue page] (https://github.com/nodejs/node-chakracore/issues).
25+
26+
### Prebuilt Node-ChakraCore binaries
27+
28+
You can download and install prebuilt Node-ChakraCore from the releases page.
29+
Currently available for:
1630

17-
#### Prebuilt Node binaries
18-
You can download and install prebuilt Node-ChakraCore from [here](https://github.com/nodejs/node-chakracore/releases).
31+
* Windows 7+: [here] (https://aka.ms/node-chakracore-release-windows)
32+
* Ubuntu 16.04 LTS x64:
33+
[preview here] (https://aka.ms/node-chakracore-release-linux)
1934

20-
#### How to build
21-
If you are looking to build this yourself. Here's what you will need.
35+
### Building Node-ChakraCore
36+
37+
If you are looking to build this yourself, here's what you will need.
38+
39+
#### Windows
2240

2341
Prerequisites:
2442
* Windows 7 SP1 or higher (Windows 8.1 or higher for ARM builds)
25-
* [Python 2.6 or 2.7](https://www.python.org)
26-
* [Visual
27-
Studio](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
43+
* [Python 2.6 or 2.7] (https://www.python.org)
44+
* [Visual Studio]
45+
(https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
2846

2947
Build Command:
3048
```batch
3149
vcbuild chakracore nosign [x86|x64|arm]
3250
```
3351

34-
#### How to test
52+
To run unit tests
3553

3654
```batch
3755
vcbuild chakracore nobuild test [x86|x64|arm]
@@ -44,28 +62,42 @@ C:\>node -e "console.log('Hello from Node.js ' + process.jsEngine)"
4462
Hello from Node.js chakracore
4563
```
4664

47-
### Linux
65+
#### Linux
4866

49-
NOTE: This is work in progress and contents are subject to change.
67+
Prerequisites:
68+
* Ubuntu 16.04 LTS x64
5069

51-
The build and test steps are similar to official node.js, with a few
52-
customizations to build and run with chakracore.
70+
Install building tools and ChakraCore dependencies:
5371

54-
#### How to build
72+
```
73+
sudo apt-get install -y build-essential cmake clang uuid-dev libunwind-dev libicu-dev liblttng-ust-dev
74+
```
75+
76+
Clone this repo and check out `xplat` branch:
5577

5678
```
57-
configure --engine=chakracore
58-
make
79+
git clone https://github.com/nodejs/node-chakracore.git
80+
cd node-chakracore
81+
git checkout xplat
5982
```
6083

61-
#### How to test
84+
Build:
6285

6386
```
64-
$ node -e "console.log('Hello from Node.js ' + process.jsEngine)"
65-
Hello from Node.js chakracore
87+
./configure --engine=chakracore
88+
make
89+
[sudo] make install
6690
```
6791

6892
To run unit tests:
93+
6994
```
7095
$ make test
7196
```
97+
98+
To test if Node.js was built correctly with ChakraCore:
99+
100+
```
101+
$ node -e "console.log('Hello from Node.js ' + process.jsEngine)"
102+
Hello from Node.js chakracore
103+
```

0 commit comments

Comments
 (0)