caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] gen_js_api: generating Javascript bindings from OCaml interfaces
@ 2015-04-27 17:38 Alain Frisch
  2015-04-27 20:35 ` Andrew Herron
  0 siblings, 1 reply; 3+ messages in thread
From: Alain Frisch @ 2015-04-27 17:38 UTC (permalink / raw)
  To: caml-list

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] gen_js_api: generating Javascript bindings from OCaml interfaces
  2015-04-27 17:38 [Caml-list] gen_js_api: generating Javascript bindings from OCaml interfaces Alain Frisch
@ 2015-04-27 20:35 ` Andrew Herron
  2015-04-27 20:42   ` Andrew Herron
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Herron @ 2015-04-27 20:35 UTC (permalink / raw)
  To: Alain Frisch, caml-list

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2004 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] gen_js_api: generating Javascript bindings from OCaml interfaces
  2015-04-27 20:35 ` Andrew Herron
@ 2015-04-27 20:42   ` Andrew Herron
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Herron @ 2015-04-27 20:42 UTC (permalink / raw)
  To: Alain Frisch, caml-list

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

On Tue, Apr 28, 2015 at 6:35 AM, Andrew Herron <thespyder@programmer.net>
wrote:

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

Oh, you did that already in the big binding discussion. Sorry, my bad!

[-- Attachment #2: Type: text/html, Size: 578 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-27 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-27 17:38 [Caml-list] gen_js_api: generating Javascript bindings from OCaml interfaces Alain Frisch
2015-04-27 20:35 ` Andrew Herron
2015-04-27 20:42   ` Andrew Herron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).