I have a patch/overlay for the binaryen cmake file that I use to build a js_of_ocaml-compatible version of binaryen.js I'd love to contribute this upstream if they'll accept it.