All of the core compiler library does compile to efficient JavaScript. For instance, see the IOCamlJS interactive notebooks that embed the entire compiler in the browser with a web UI. Just press the play button:
- http://andrewray.github.io/iocamljs/oh261.html (H.261 video decoding)
- http://www.ujamjar.com/hardcaml/ (HardCaml RTL hardware description language, similar to Chisel in Scala)
- http://gazagnaire.org/fuconf14/ (building a 2048 game implementation)