This release is available as multiple OPAM switches:
- 4.03.0 — Official 4.03.0 release
- 4.03.0+flambda — Official 4.03.0 release with flambda enabled
- 4.03.0+fp — Official 4.03.0 release with frame pointers
- 4.03.0+fp+flambda — Official 4.03.0 release with frame pointers and flambda enabled
Some of the highlights in release 4.03 are:
- A new intermediate representation, called Flambda, was added to the
native-code compiler, along with several new optimizations over the
Flambda representation, such as aggressive function inlining. (The
Flambda optimizer needs to be activated at configuration time by
- New language feature: inline records as arguments to datatype constructors. This makes it possible to name the arguments of a constructor, and use convenient record notation to access them, without the cost of declaring a separate record type for the arguments.
@untaggedattributes are supported on external function declarations to pass parameters and results to C stub functions in a more efficient way. Other attributes honored by the compiler include
- Improvements to the garbage collector, resulting in better GC latency (shorter GC pauses).
- Support for ephemerons, a more general form of GC finalization of data structures.
- The runtime system is now compiled at higher levels of C optimization, resulting in significant speedups for the bytecode interpreter.
- New native code generators supporting the PowerPC 64-bit architecture (in big and little-endian modes) and the IBM zSystem architecture.
- The whole code base (compilers, libraries and tools) is now licensed under the LGPL v2.1 with static linking exception.
- The ocamlbuild compilation manager was split off and lives as an independent project.
For a comprehensive list of changes and details on all new features, bug fixes, optimizations, etc., please consult the release notes.
Source tarball (.tar.gz) for compilation under Unix (including Linux and MacOS X) and Microsoft Windows (including Cygwin).
Also available in .zip format.
OPAM is a source-based distribution of OCaml and many companion libraries and tools. Compilation and installation are automated by powerful package managers.
The official development repo is hosted on GitHub.
The INSTALL file of the distribution provides detailed compilation and installation instructions.
Binary distributions for Linux
Binary distributions for CentOS, Debian, Fedora, RHEL, Ubuntu are available here.
Binary distribution for Microsoft Windows
Cygwin-based native Win32 port. A self installer. The interactive loop comes with a simple graphical user interface. Some features require the Cygwin environment, which the installer can fetch for you. However, the compilers are, and generate true Win32 executables, which do not require Cygwin to run.
Microsoft-based native Win32 port. No binary distribution available yet; download the source distribution and compile it.
Cygwin-based port. Requires Cygwin. No graphical user interface is provided. The compilers generate executables that do require Cygwin. The precompiled binaries are part of the Cygwin distribution; you can install them using the Cygwin setup tool. Alternatively, download the source distribution and compile it under Cygwin.
Microsoft-based native Win64 port Same features as the Microsoft-based native Win32 port, but generates 64-bit code. No binary distribution available yet; download the source distribution and compile it.
Precompiled binaries for Solaris
Available at sunfreeware.com.
Additionally, the following projects allow you to compile OCaml code to targets traditionally associated with other languages:
The ocaml-java project, an OCaml to Java compiler (stable)
The user's manual for OCaml can be: