From: "Jérôme Vouillon" <jerome.vouillon@pps.univ-paris-diderot.fr>
To: caml-list@inria.fr, "ocsigen@inria.fr" <ocsigen@inria.fr>
Subject: [Caml-list] [ANN] Ocsigen Js_of_ocaml 2.0
Date: Fri, 11 Apr 2014 15:12:50 +0200 [thread overview]
Message-ID: <5347EA52.2070708@pps.univ-paris-diderot.fr> (raw)
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
next reply other threads:[~2014-04-11 13:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 13:12 Jérôme Vouillon [this message]
2014-04-11 13:36 ` Jacques-Pascal Deplaix
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=5347EA52.2070708@pps.univ-paris-diderot.fr \
--to=jerome.vouillon@pps.univ-paris-diderot.fr \
--cc=caml-list@inria.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