cfallin / waffle

Apache License 2.0
56 stars 5 forks source link

Minor corrections to readme regarding Binaryen #10

Closed kripken closed 1 month ago

kripken commented 1 month ago

The readme mentions this:

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

cfallin commented 1 month ago

Just updated, thanks!