Since WebAssembly is a portable format, you don't need to rebuild .wasm
or .wat
files to run
them on your local machine.
Simply run:
$ wain hello/hello.wat
$ wain hello/hello.wasm
Please use Clang for compiling C source into Wasm and wabt to compile C sources into WebAssembly text-format.
If you're using macOS, please install Clang via Homebrew. Apple Clang does not seem to support WebAssembly for now.
$ brew install llvm
Makefile is available to build files easily.
To rebuild all sources:
$ make
To rebuild a specific Wasm file in binary-format:
$ make hello/hello.wasm
To rebuild a specific Wasm file in text-format:
$ make hello/hello.wat
Please see api/README.md.