All Releases

OCaml 5.5.2

This page describes OCaml version 5.5.2, released on 2026-10-23. Go here for a list of all releases.

This release is available as an opam package.

Installation Instructions

The base compiler can be installed as an opam switch with the following commands:

opam update
opam switch create 5.5.2

The source code for OCaml 5.5.2 is also directly available on:

Configuration Options

The configuration of the installed opam switch can be tuned with the following options:

  • ocaml-option-afl: Set OCaml to be compiled with afl-fuzz instrumentation
  • ocaml-option-bytecode-only: Compile OCaml without the native-code compiler
  • ocaml-option-flambda: Set OCaml to be compiled with flambda activated
  • ocaml-option-musl: Set OCaml to be compiled with musl-gcc
  • ocaml-option-no-flat-float-array: Set OCaml to be compiled with --disable-flat-float-array
  • ocaml-option-static: Set OCaml to be compiled with musl-gcc -static
  • ocaml-option-tsan : Set OCaml to be compiled with thread sanitiser support
  • ocaml-option-address-sanitizer: Set OCaml to be compiled with address sanitiser
  • ocaml-option-leak-sanitizer: Set OCaml to be compiled with leak sanitiser
  • ocaml-option-fp: Set OCaml to be compiled with frame pointers

For instance, one can install a switch with both flambda and the --disable-flat-float-array option with

opam switch create 5.5.2+flambda+nffa ocaml-variants.5.5.2+options ocaml-option-flambda ocaml-option-no-flat-float-array

Source Distribution

  • 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. See also the Windows release notes for instructions on how to build under Windows.

Alternative Compilers

Additionally, the following projects allow you to compile OCaml code to targets traditionally associated with other languages:

User Manual

The user manual for OCaml can be:

Changes

Bug fixes

  • #15045: Atomic loads whose results are unused should not be removed during dead-code elimination. (Xavier Clerc, review by Steven Dolan and KC Sivaramakrishnan)

  • #15067, #15071: Fix detection of functions available in the future on macOS. (Antonin Décimo, review by Nicolás Ojeda Bär and Damien Doligez)

  • #15112, OSEC-2026-22: Unix.map_file: protect against overflow when computing the data size. (Xavier Leroy and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär and Edwin Török)

  • #15113, OSEC-2026-21: Str.string_partial_match: make sure captured groups are valid. (Xavier Leroy, review by Nicolás Ojeda Bär and Edwin Török)

  • #15115, OSEC-2026-23: Fix multiple issues in demarshaling (Marshal.from_{channel,string,bytes}) (Xavier Leroy, review by Nicolás Ojeda Bär)

  • #15133, OSEC 2026-24: Multiple issues in command quoting on Windows (Xavier Leroy and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär)

  • #15119, OSEC-2026-25: Harden decoding of runtime events messages from ring buffers. (Sadiq Jaffer, report by Hannes Mehnert, review by Olivier Nicole and Edwin Török)

  • #15177, OSEC-2026-26: Maintain custom events cache integrity. (Sadiq Jaffer, report by Hannes Mehnert, review by Edwin Török)

  • #15043, #15076: runtime events library, fix an infinite loop when a user event is larger than half the ring buffer. (Tim McGilchrist, review by Sadiq Jaffer)

  • #15185, #15187: fix a pattern-matching miscompilation on certain combinations of immediate ranges and redundant patterns (Gabriel Scherer, report by Alperer Keleş, review by Vincent Laviron and Florian Angeletti)