Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Opa Language
Pull request Compare This branch is 2004 commits behind MLstate:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.



Opa is an advanced framework for JavaScript, made of two parts:

  • A compiler from the Opa language, which features JavaScript-like syntax but introduces many enhancements;
  • A JavaScript library, which is used at runtime.

This repository contains all the sources of both the Opa compiler and the Opa library.

Quick build instructions

$ ./configure
$ make
$ sudo make install

should get you there ./configure should report any missing dependencies and point you to the packages you may install to fix them (although those may depend on your distribution). make needs to be GNU make.

The main dependency of Opa is OCaml 3.12 and Node.js 0.6. In case your distribution doesn't provide a recent enough version, or if you miss some other dependencies, you can use the script, which automates the download and installation of our dependencies. Try

$ dependencies/ --help

Directory layout

  • _build: compilation target directory
  • build: build scripts and auxiliary Makefiles
  • copyright: some copyright information used in our binary package, which includes external software (as obtained from the dependency installation helper).
  • dependencies: contains the dependency installation helper
  • dissemination: contains helper programs to run on the cloud (transitional)
  • installer: auxiliary files used to build binary packages
  • plugins: additional Opa library modules (work in progress)
  • stdlib: the Opa standard library
  • tools: contains external checking tools; see Credits below
  • utils: some auxiliary, independent tools like bash completion, syntax highlighting for popular editors, etc.

The other directories contain the source of the Opa libraries, compiler, and tools.

Files at the root of the repository:

  • *.mllib: ocamlbuild target declaration for building an ocaml lib
  • *.itarget: ocamlbuild target declaration for building a set of targets
  • builds a full Opa runtime in order to make a binary package
  • some helpers to guarantee script compatibility, mostly between Linux and MacOS
  • builds various kinds of binary packages from the file hierarchy created by

The build system

The build system is based on OCamlbuild; the included build/Makefile.bld dynamically builds an ocamlbuild plugin and generates targets based on files build_libs, build_tools and

See build/Makefile.bld and for more information. All generated files are put in _build, following the same hierarchy as the source directory.


All bug reports, feedback, comments, contributions or remarks are welcome, either on our website:

In particular, users are welcome to:

Something went wrong with that request. Please try again.