A fork of binaryen
, adding Haskell
raw bindings. This package is a part of the
asterius
Haskell-to-WebAssembly compiler
project, yet it may also be useful to other WebAssembly-related Haskell projects
as well.
The custom Setup.hs
script calls cmake
and make
to build libbinaryen.a
and the binaryen
executables, use the MAKEFLAGS
environment variable to pass
additional flags to make
(e.g. -jN
). A simple stack build
should work
fine; for cabal
users, hpack
needs to be run on package.yaml
to generate
binaryen.cabal
.
Bindings.Binaryen.Raw
contains 1-to-1 raw bindings to the binaryen
C
API.
Executables which use this module will automatically link against libstdc++
and libbinaryen
.
It's also possible to run the binaryen
executables like wasm-opt
; use
Paths_binaryen.getBinDir
to get the executable location.