gen_js_api aims at simplifying the creation of OCaml bindings for JavaScript libraries. It must currently be used with the js_of_ocaml compiler, although other ways to run OCaml code "against" JavaScript might be supported later with the same binding definitions (for instance, Bucklescript, or direct embedding of a JS engine in a native OCaml application).
gen_js_api is based on the following ideas:
Authors of bindings write OCaml signatures for JavaScript libraries and the tool generates the actual binding code with a combination of implicit conventions and explicit annotations.
The generated binding code takes care of translating values between OCaml and JavaScript and of dealing with JavaScript calling conventions.
All syntactic processing is done by authors of bindings: the client code is normal OCaml code and does not depend on custom syntax nor on JS-specific types.
js_of_ocaml: The compiler and runtime system on which gen_js_api relies. (Note: gen_js_api doesn't depend on js_of_ocaml's OCaml library, nor on its language extension.)
goji: A DSL to describe OCaml bindings for JavaScript libraries.