Module Ocamlbuild_js_of_ocaml

module Ocamlbuild_js_of_ocaml : sig..end

Ocamlbuild plugin to build with js_of_ocaml


Js_of_ocaml comes with a support for OCamlbuild.

Initialize

Initialize the js_of_ocaml ocamlbuild plugin with the following code in myocamlbuild.ml:

let _ = Ocamlbuild_plugin.dispatch Ocamlbuild_js_of_ocaml.dispatcher

Side note: Ocamlbuild_plugin.dispatch should be used only once. The last call will override previous ones.

With Oasis

If you use oasis, myocamlbuild.ml should look like:

let _ =
       Ocamlbuild_plugin.dispatch
         (fun hook ->
            dispatch_default hook;
            Ocamlbuild_js_of_ocaml.dispatcher
              ~oasis_executables:["src/yourprogram.byte"]