API reference

The Js_of_ocaml distribution ships several opam packages, each providing one or more libraries. This page lists the public modules of every package; see the documentation home for the manual.

The top-level module of each library also states, in its own documentation, which opam package provides it.

js_of_ocaml — the base library

Provided by the js_of_ocaml opam package (library js_of_ocaml).

Core runtime and JavaScript values:

Browser APIs:

The same opam package also provides the js_of_ocaml.deriving library — the runtime used by the code that [@@deriving json] generates:

js_of_ocaml-lwt — Lwt support

Provided by the js_of_ocaml-lwt opam package (library js_of_ocaml-lwt).

js_of_ocaml-ppx_deriving_json — JSON derivation syntax

Provided by the js_of_ocaml-ppx_deriving_json opam package. This is the PPX that derives JSON serializers ([@@deriving json]); the generated code relies on the Deriving_Json runtime from the js_of_ocaml package above. See the manual for usage.

js_of_ocaml-tyxml — TyXML support

Provided by the js_of_ocaml-tyxml opam package (library js_of_ocaml-tyxml).

Provided by the js_of_ocaml-toplevel opam package (library js_of_ocaml-toplevel).