Skip to content
JavaScriptCore on WebAssembly
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead, 6 commits behind mbbill:master.
Latest commit 6990dc5 May 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Source make prompt look good for no ncurses mode May 6, 2019
build make prompt look good for no ncurses mode May 6, 2019
demo update wasm file; add symbols file May 6, 2019
vsproj Merged all test project into one. From now on, visual studio project … Sep 21, 2017
.gitignore Add UpdateGN.sh Jan 9, 2019
.gn added gn build scripts Sep 18, 2017
BUILD.gn Added msvc toolchain Sep 19, 2017
README.md Update README.md May 7, 2019
VER.txt added upstream version hash. Sep 28, 2017
_config.yml Set theme jekyll-theme-hacker Sep 15, 2017
build.sh Added README and wapm configuration May 7, 2019
vs-chromium-project.txt
wapm.toml Added README and wapm configuration May 7, 2019

README.md

JavaScriptCore

The JavaScript engine that powers Safari.

You can install JavaScriptCore with wapm:

wapm install -g jsc

Running

You can run the jsc shell:

$ jsc
>>> function multiply(a, b) { return a * b; }
undefined
>>> multiply(10, 20)
200
>>> 0.1 + 0.2
0.30000000000000004
>>> Date();
Mon Apr 15 2019 19:05:43 GMT-c100 (UTC)
>>>

Building from Source

You will need Emscripten SDK (emsdk), Python, Ruby, and Ninja to build the php.wasm file.

Steps:

  1. Setup emsdk (>= 1.38.11), see Installation Instructions
  2. Run bash build.sh

Manual step-by-step instructions:

Preparation on Mac

  • install emscripten
  • install python, ruby, ninja, etc.
  • run ./build/gn/UpdateGN.sh to download latest gn.
  • run ./Source/JavaScriptCore/DerivedSources/gen.sh to generate derived sources.

Preparation on Windows

  • install emscripten
  • install python, ruby, ninja, etc.
  • run build/gn/download.bat to download latest gn.exe.
  • run Source/JavaScriptCore/DerivedSources/gen.bat to generate derived sources.

Build with gn

> ./build/gn/mac/gn gen out --args="target_os=\"wasm\""
> ninja -C out

Build test shell on Windows

> gn gen out --args="target_os=\"win\""
> ninja -C out
You can’t perform that action at this time.