Binaryen is able to stackify/reloop arbitrary control flow (CFG to Wasm) but does not implement the other direction (Wasm to CFG)
Binaryen does actually have wasm to CFG utilitites. In particular cfg-traversal builds up a CFG, on top of which we build liveness analyses and other things, which are used by many passes (see also the higher-level cfg.h). There is also the ReReloop pass which converts wasm to a CFG, optimizes the shape of the CFG, and converts back.
Another minor point from the readme:
and [Binaryen] has only a C/C++ API, not Rust.
Not in the core repo, yeah. But there are a few bindings for Binaryen to Rust, see
The readme mentions this:
Binaryen does actually have wasm to CFG utilitites. In particular cfg-traversal builds up a CFG, on top of which we build liveness analyses and other things, which are used by many passes (see also the higher-level cfg.h). There is also the ReReloop pass which converts wasm to a CFG, optimizes the shape of the CFG, and converts back.
Another minor point from the readme:
Not in the core repo, yeah. But there are a few bindings for Binaryen to Rust, see