That looks very cool, particularly the @@js preprocessor. I will hopefully have time to try it in the near future.

The oscigen list might be interested to hear about this as well :)





On Mon, Apr 27, 2015 at 10:38 AM -0700, "Alain Frisch" <alain.frisch@lexifi.com> wrote:

Dear all,

LexiFi is currently experimenting with the js_of_ocaml compiler in order 
to create some browser-side applications in OCaml. In this context, we 
have started a new project called gen_js_api which aims at simplifying 
the creation of bindings to Javascript libraries.

The approach is quite different from js_of_ocaml's native FFI (which 
relies on language extensions). In gen_js_api, authors of bindings 
define the expected OCaml interface, annotated with light attributes to 
define the actual mapping to Javascript; and client of generated 
bindings work with native OCaml types, without requiring any language 
extension, nor any knowledge of how js_of_ocaml represents OCaml values 
in Javascript.

gen_js_api has reached a state where actual bindings can be written, and 
it is reasonably well documented. It is now a good time to look at the 
project if you're interested in this topic. Of course, feel free to 
comment on the project or contribute to it.

Project page:

   https://github.com/alainfrisch/gen_js_api


Alain

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs