package js_of_ocaml

  1. Overview
  2. Docs
Compiler from OCaml bytecode to JavaScript

Install

dune-project
 Dependency

Authors

Maintainers

Sources

js_of_ocaml-6.4.1.tbz
sha256=e59bbffcaefaba3191620556514b7f53bb3249e3f881a070d72724234dffd819
sha512=bb470f316f9c81a3b2b8dedd0b0f18f8e06beb48dd70df1d9f846de90ffab439cab5ef7a93a8166af0998068b06097e8319bc0d9f4f23a7159b0de8b3b515746

doc/api.html

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_lwt.Lwt_js — sleeping and yielding
  • Js_of_ocaml_lwt.Lwt_js_events — DOM events as Lwt threads
  • Js_of_ocaml_lwt.XmlHttpRequest — XMLHttpRequest with Lwt
  • Js_of_ocaml_lwt.Jsonp — JSONP requests
  • Js_of_ocaml_lwt.File — reading files with Lwt
  • Js_of_ocaml_lwt.Promise — bridge between Lwt threads and JS promises

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).

  • Js_of_ocaml_tyxml.Tyxml_js — build and manipulate DOM trees with TyXML
  • Js_of_ocaml_tyxml.Tyxml_cast — cast between TyXML and Dom nodes
  • Js_of_ocaml_tyxml.Tyxml_cast_sigs — signatures for the casts

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

  • Js_of_ocaml_toplevel.JsooTop — run an OCaml toplevel in the browser