The OCaml system is open source
software: the compiler is distributed under the terms of the Q
Public License, and its library is under LGPL; please read the
document for more details.
A BSD-style license is also available for a fee through the OCaml
The most recent released version of OCaml is OCaml 4.00.1,
released on 2012-10-05.
Development versions, and earlier releases are also
available; the most recent stable release of the the previous major
version of OCaml was 3.12.1, released in
Release 4.00.1 is mostly a bugfix release.
Some of the highlights in release 4.0.0 (July 2012) are:
- The name the language is now officially "OCaml", and this name
is used consistently in all the documentation and tool
- Generalized Algebraic Data Types (GADTs): this is a powerful
extension of the type system that provides great flexibility and
power to the programmer.
- A new and improved ARM back-end.
- Changes to first-class modules: type annotations can now be
omitted when packing and unpacking modules (and are inferred from
context whenever possible), and first-class modules can now be
unpacked by pattern-matching.
- Support for randomized hash tables to avoid denial-of-service
- Installation of the compiler's internal libraries in
+compiler-libs for easier access by third-party
For more information, please consult the comprehensive
list of changes.
- Source tarball (.tar.gz) for compilation under Unix
(including Linux and MacOS X) and Microsoft Windows (including
- Also available in .tar.bz2 format.
- You also have read-only SVN access to the
working sources and to all previous public releases.
The INSTALL file of the distribution provides detailed
compilation and installation instruction.
Precompiled binaries for Linux
Precompiled binaries for
Binary package compiled on Mac OS 10.7.5 with XCode
tools 4.4 (probably not compatible with earlier versions of Mac OS
Precompiled binaries for
Four ports of OCaml for Microsoft Windows
are currently available. For additional information, please consult
the list of portability issues or the Windows release notes.
- Cygwin-based native Win32 port (4.00.0). 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
- 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
Alternatively, download the source distribution and compile it under
- 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 user's manual for OCaml can be: