Wasm_of_ocaml is a fork of Js_of_ocaml that allows you to compile OCaml bytecode into WebAssembly. To use Wasm_of_ocaml, you need to have the Binaryen toolchain installed. The generated code is currently compatible with Chrome beta and node V8 canary, but some flags need to be enabled for Chrome. To install Wasm_of_ocaml, you can use the provided commands, and additional packages can be installed if necessary. To compile your program, you first need to use the OCaml bytecode compiler ocamlc. Javascript bindings and syntax extensions are provided by the js_of_ocaml package. The Wasm_of_ocaml compiler then produces the WebAssembly code. Debugging can be done by serving the files using a web server. Some features like file-related functions and separate compilation are not yet supported, and compatibility with Js_of_ocaml requires some adaptations. There are also compatible versions of Brr and Gen_js_api available for Wasm_of_ocaml.
https://github.com/ocaml-wasm/wasm_of_ocaml