-
Notifications
You must be signed in to change notification settings - Fork 116
User Manual AS2WASM
Erik de Bruin edited this page Nov 16, 2017
·
26 revisions
Your system will need to have the following tools available/installed:
The build of wat2wasm requires make and CMake to be installed on your computer:
PATH
Add the bin directory of CMake to the PATH:
On a Mac, set PATH to
export PATH=/Applications/CMake.app/Contents/bin:$PATH
To use Royale WAST you need - for now - to get and set up 2 git repos:
git clone https://github.com/apache/royale-compiler.git royale-compiler
cd royale-compiler
git checkout feature/wast
cd ..
git clone https://github.com/apache/royale-asjs.git royale-asjs
cd royale-asjs
git checkout feature/wast
Now we build the compiler project by running:
cd royale-compiler
ant sdk
The compiler puts out '.wat' files (WebAssembly Text format). In order to compile these files into the binary '.wasm', we have to use the wat2wasm tool.
npm install -g webassembly-binary-toolkit
Note: this will take a considerable amount of time to finish!
cd royale-asjs/wast
npm run dev-build
cd royale-asjs/wast
npm run create-project -- -dir=[root dir] -name=[project name]
cd [root dir] /[project name]
npm run build
Apache®, Apache Royale, Royale™, and the Royale logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.