EnglishFrenchSpanish

OnWorks favicon

js_of_ocaml - Online in the Cloud

Run js_of_ocaml in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command js_of_ocaml that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


js_of_ocaml - OCaml bytecode to Javascript compiler

DESCRIPTION


js_of_ocaml(1) is a compiler from OCaml bytecode programs to Javascript. It makes it
possible to write OCaml programs that run on web browsers.

It comes with bindings for a large part of the browser APIs, and the generated programs
have been measured to typically run faster the OCaml bytecode interpreter.

USAGE


Your program must be first compiled using the OCaml bytecode compiler ocamlc(1).
Javascript bindings, as well as a corresponding syntax extension, are provided by the
js_of_ocaml package.

ocamlfind ocamlc -package js_of_ocaml -package js_of_ocaml.syntax \
-syntax camlp4o -linkpkg -o input_file.byte input_file.ml

Then, run the js_of_ocaml(1) compiler to produce Javascript code.

js_of_ocaml [ options ] input_file.byte

OPTIONS


The following command-line options are recognized by js_of_ocaml(1).

-debug name
debug module name

-disable name
disable optimization name

-pretty
pretty print the output

-debuginfo
output debug info

-noinline
disable inlining

-noruntime
do not include the standard runtime

-toplevel
compile a toplevel

-I dir Add dir to the list of include directories

-o file
set output file name to file

-help Display the list of options

--help Display the list of options

FEATURES, LIMITATIONS


The whole OCaml standard library should be supported, except for input/output channels,
weak references, and most functions of the Sys module. Extra libraries such as Bigarray,
Unix, Thread or Str are not supported.

Tail call is not optimized in general. However, self-recursive functions (when the tail
calls are to the function itself) are compiled into a loop.

Recursive modules are not supported at the moment.

Data representation differs from the usual one, for performance reasons. Most notably,
integers are 32 bit (instead of 31 or 63 bits) and floats are not boxed. As a consequence,
marshalling, polymorphic comparison, and hashing functions can yield results different
than usual:

· marshalling of floats is not supported (unmarshalling works);

· the polymorphic hash function will not give the same results on data structures
containing floats;

· these functions may be more prone to stack overflow, as the Javascript stack is small.

Use js_of_ocaml online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • 2
    gMKVExtractGUI
    gMKVExtractGUI
    A GUI for mkvextract utility (part of
    MKVToolNix) which incorporates most (if
    not all) functionality of mkvextract and
    mkvinfo utilities. Written in C#NET 4.0,...
    Download gMKVExtractGUI
  • 3
    JasperReports Library
    JasperReports Library
    JasperReports Library is the
    world's most popular open source
    business intelligence and reporting
    engine. It is entirely written in Java
    and it is able to ...
    Download JasperReports Library
  • 4
    Frappe Books
    Frappe Books
    Frappe Books is a free and open source
    desktop book-keeping software that's
    simple and well-designed to be used by
    small businesses and freelancers. It'...
    Download Frappe Books
  • 5
    Numerical Python
    Numerical Python
    NEWS: NumPy 1.11.2 is the last release
    that will be made on sourceforge. Wheels
    for Windows, Mac, and Linux as well as
    archived source distributions can be fou...
    Download Numerical Python
  • 6
    CMU Sphinx
    CMU Sphinx
    CMUSphinx is a speaker-independent large
    vocabulary continuous speech recognizer
    released under BSD style license. It is
    also a collection of open source tools ...
    Download CMU Sphinx
  • More »

Linux commands

Ad