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.0.tbz
sha256=7ae22a7e5a6c6aa14a8e2695fa62c66f32cb20db17f1b45dc21e97009342151f
sha512=6cea398d61d4be8e38e912ba7e4bad4f7b81b10d946cdf29026274b5a4b2cc2709fb75e23f7cbe2db335cc65679c262a8aa1b9148effc987d6e79665a7538286

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