thead_admin 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
..
Makefile.standalone-help 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
bloat 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
crosstest 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
docs 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
pnacl-llvm 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
pydir 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
runtime 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
src 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
tests_lit 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
unittest 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
wasm-tests 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
.dir-locals.el 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
.gitignore 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
Android.bp 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
CMakeLists.txt 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
DESIGN.rst 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
LICENSE.TXT 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
Makefile 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
Makefile.standalone 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
OWNERS 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
README-wasm.md 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
README.rst 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
c2wasm-exe.sh 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
codereview.settings 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago
fetch-torture-tests.sh 6aab0fd6f1 Linux_SDK_V0.9.5 1 year ago

README-wasm.md

Wasm Prototype Experiment Notes

Here’s the command I use to test:

LD_LIBRARY_PATH=~/nacl/v8/out/native/lib.target make -j48 \
    -f Makefile.standalone WASM=1 && \
LD_LIBRARY_PATH=~/nacl/v8/out/native/lib.target ./pnacl-sz -O2 -filetype=asm \
    -target=arm32 ./torture-s2wasm-sexpr-wasm/20000112-1.c.s.wast.wasm

You’ll probably need to adjust your LD_LIBRARY_PATH to point to where your v8 libraries are.

You’ll need to build v8 as a shared library. Build it like this:

make -j48 native component=shared_library

wasm-run-torture-tests.py can be used to run all the tests, or some subset. Running a subset will enable verbose output. You can download the torture tests from the WebAssembly waterfall or by running ./fetch-torture-tests.sh.

To compile and run an executable, do the following from the subzero directory.

./pnacl-sz -filetype=obj -o foo.o foo.wasm
clang -m32 foo.o src/wasm-runtime.c
./a.out

Other useful commands:

Compile a C file to a .wasm

./wasm-install/bin/emscripten/emcc hello-wasm.c -s BINARYEN=1
./wasm-install/bin/sexpr-wasm a.out.wast -o a.out.wasm