Skip to content
Learning WASM
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This repo contains various samples of programs I hacked when learning about WASM.


In order to get something meaningful out of following the cruft stored in this repo you need to install some software on your workstation first:

  • CMake version 3.2 or higher (homebrew formula/package is available for macOS users)
  • You need to install WABT: The WebAssembly Binary Toolkit
  • You need to install Emscripten Toolkit
  • You need to install Rust and its toolchain
  • You need to install nodejs (yes, JavaScript headaches will inevitably ensue)
  • You need a browser which supports WASM. In my case that's firefox which has WASM enabled by default in version 52+


The toolkit contains some annoying git submodules so you need to clone the repo recursively

git clone --recursive
cd wabt

You can install the built wabt tools by running

make install

On macOS these are installed into /usr/local/bin.


The guide available on the URL mentioned above is pretty straightforward; I'm adding the list of commands here so I dont have to browse through and open "hundreds" of browser tabs:

git clone
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./


The repo is structured into multiple subdirectories each containing some playground code written in some programming language; clang has source code written in C, rust in Rust etc.

Each subdirectory has a list of steps how to build and run the code so you should be able to just follow the guide step by step.

You can’t perform that action at this time.