This is only a test. Do not use in production.
-
Install clang on your system. On Mac it should already be installed. For Ubuntu, you can do
sudo apt-get install clang
. -
Download and install the Emscripten SDK (emsdk).
-
Install wabt if you want to be able to convert wasm files to wat (text format). Make sure to do
git clone --recursive
or it will not grab all of the required submodules. -
Activate emsdk:
source /path/to/emsdk_env.sh
-
Compile libf2c:
cd src/f2c/libf2c/llvm
make
If your system clang (not the clang bundled with emsdk) is not located at /usr/bin/clang
, modify the SYSTEM_CLANG
variable in the Makefile.
- Compile wasm/asm.js:
cd src/mvtdst
./compile.sh