I’ve just released JsOfOCairo on OPAM and @avsm suggested I announce it here.
JsOfOCairo lets you reuse Cairo-based drawing code in web browsers. It’s an adapter, implementing (a reasonable subset of) the interface of ocaml-cairo targeting HTML5 canvas elements as exposed to OCaml by js_of_ocaml.
This allows writing things like DrawGrammar which… draws railroad diagrams of grammars expressed in EBNF. There are some examples on the interactive demo page.