/wasm-exprgen

Expression generator for WebAssembly

Primary LanguageJavaScript

Wasm-Exprgen

This is a tool to generate random WebAssembly programs using csmith and emscripten.

Requirements

For more details on how to build Emscripten from source refer to Emscripten Toolchain requirements

Setup

# Initialize submodule
git submodule update --init

# Install required modules for build scripts
npm install --production

Building tools

npm run build-tools

Usage

The following command will run csmith to generate a .c file then it runs emscripten to compile and generate WebAssembly from it. It is possible for csmith to generate code that is not supported by llvm.

npm run gen

At this point, if it successfully built in llvm, there should be a a series of test.* files in the output directory.