Introduction to ocamljs

Ocamljs is a system for compiling OCaml to Javascript. It includes a Javascript back-end for the OCaml compiler, as well as several support libraries, such as bindings to the browser DOM. Ocamljs also works with orpc for RPC over HTTP, and froc for functional reactive browser programming. The full OCaml language and much of the OCaml standard library is supported. There is special support for the object system so Javascript objects may be called from OCaml and vice-versa.


Third-party libraries

See the Ocamldoc and some examples.


If you find a bug, it would be very helpful to get a test case that produces different behavior from regular OCaml (see test/jscomp for examples). Other contributions are very welcome as well. The best way to submit a bug is to add a Github issue. The best way to submit a patch is to send a Github pull request.

See also