/wasp

WebAssembly module decoder in C++

Primary LanguageC++Apache License 2.0Apache-2.0

CircleCI

wasp

Wasp is a C++ library designed to make it easy to work with WebAssembly modules. Unlike tools like wabt, it is designed to be used as a library.

It also includes the wasp tool, which has the following commands:

wasp dump examples

Disassemble all functions in a module:

$ wasp dump -d mod.wasm

Display all sections in a module:

$ wasp dump -h mod.wasm

Display the contents of the "import" section:

$ wasp dump -j import -x mod.wasm

wasp callgraph examples

Write the callgraph as a DOT file to stdout.

$ wasp callgraph mod.wasm

Write the callgraph as a DOT file to file.dot.

$ wasp callgraph mod.wasm -o file.dot

wasp cfg examples

Write the CFG of function 0 as a DOT file to stdout.

$ wasp cfg -f 0 mod.wasm

Write the CFG of function foo as a DOT file to file.dot.

$ wasp cfg -f foo mod.wasm -o file.dot

wasp dfg examples

Write the DFG of function 0 as a DOT file to stdout.

$ wasp dfg -f 0 mod.wasm

Write the DFG of function foo as a DOT file to file.dot.

$ wasp dfg -f foo mod.wasm -o file.dot