caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques-Pascal Deplaix <jp.deplaix@gmail.com>
To: "Jérôme Vouillon" <jerome.vouillon@pps.univ-paris-diderot.fr>,
	caml-list@inria.fr, "ocsigen@inria.fr" <ocsigen@inria.fr>
Subject: Re: [Caml-list] [ANN] Ocsigen Js_of_ocaml 2.0
Date: Fri, 11 Apr 2014 15:36:32 +0200	[thread overview]
Message-ID: <5347EFE0.6050908@gmail.com> (raw)
In-Reply-To: <5347EA52.2070708@pps.univ-paris-diderot.fr>

Note also that this release includes an ocamlbuild plugin which can be 
used with ocaml >= 4.01.

You can now build your javascript program with the following "steps":
  $ ls
yourprogram.ml myocamlbuild.ml
  $ cat myocamlbuild.ml
Ocamlbuild_plugin.dispatch Ocamlbuild_js_of_ocaml.dispatcher;;
  $ ocamlbuild -plugin-tags js_of_ocaml.ocamlbuild yourprogram.js

Then yourprogram.js can be found in the _build directory

The full Changelog is available here:
https://github.com/ocsigen/js_of_ocaml/blob/089b051f4f819caa51036627846c35a194b9430c/CHANGES

On 04/11/2014 03:12 PM, Jérôme Vouillon wrote:
> Hi,
>
> We are happy to announce release 2.0 of Js_of_ocaml, the compiler from
> OCaml bytecode to JavaScript.
>
> A lot of efforts has been put in reducing the size of the generated
> JavaScript code. Much shorter variable names are used; unnecessary
> whitespaces and semicolons are omitted; multiple occurrences of a same
> constant are shared... The runtime is minified as well. You can expect
> a space reduction of 15% to 20%.
>
> Recursive modules are now supported. Tail calls between mutually
> recursive functions are optimized (using trampolines). In particular,
> lexers produced by ocamllex are now properly optimized.
>
> The runtime now simulates a small filesystem (in memory), which makes
> it possible to use the OCaml I/O functions. The standard outputs are
> by default redirected to the JavaScript console, which is convenient
> for debugging.
>
> A larger part of the OCaml libraries are supported: bigarrays, the
> time-related functions of the Unix library.
>
> A number of incompatible changes have been made. In particular:
> - JavaScript numbers are simply given type 'float' rather than type
>    'float Js.t';
> - the compiler generates "strict mode" JavaScript; therefore,
>    'Js.Unsafe.variable "this"' does not refer to the JavaScript
>    global object ("window" in browsers) anymore; you can use
>    'Js.Unsafe.global' instead;
> - runtime primitives are now wrapped together with the generated code
>    in a huge function so as not to pollute the global scope.
>
> LINKS
>
> Project home page  http://ocsigen.org/js_of_ocaml/
> Download           http://ocsigen.org/download/js_of_ocaml-2.00.tar.gz
> Get source code    git clone https://github.com/ocsigen/js_of_ocaml.git
> Documentation      http://ocsigen.org/js_of_ocaml/manual/
>
>
> Regards,
>
> -- Jérôme Vouillon and Hugo Heuzard


  reply	other threads:[~2014-04-11 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11 13:12 Jérôme Vouillon
2014-04-11 13:36 ` Jacques-Pascal Deplaix [this message]
2014-04-11 13:42   ` Jacques-Pascal Deplaix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5347EFE0.6050908@gmail.com \
    --to=jp.deplaix@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=jerome.vouillon@pps.univ-paris-diderot.fr \
    --cc=ocsigen@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).