In the OCaml library ecosystem, there are two important pieces of software that are being relied on for managing our code:
-
ocamlfind, lead by Gerd Stolpmann has been the standard for managing OCaml libraries for many years. It provides a convention for storing libraries on the filesystem, and a
META
file format for describing the properties of libraries. There is a CLI tool that interpretsMETA
files and makes it easy to embed within build systems. -
dune, lead by @jeremiedimino, is an specialised build system for OCaml that aims to be fast and expressive. Dune’s functionality complements but doesn’t fully replace ocamlfind – it can interpret
META
files as installed by ocamlfind, but it also now has newer features such as virtual libraries which cannot be expressed by ocamlfind. Dune installs adune-package
file with every library that contains its full metadata, and translates the compatible subset into the META format as well.
This has lead to some incompatibilities in recent months, since independent build systems now need to handle two separate formats (META
and dune-package
). Therefore, the authors of both systems have gotten together to make the following changes to improve the consistency of our community:
-
ocamlfind has moved to github.com/ocaml/ocamlfind from its former home at GitLab. Gerd will work on migrating links and merge requests from the old repository to the new home. This also belatedly recognises ocamlfind as a very important piece of the OCaml Platform and ecosystem, by hosting it at the
ocaml/
GitHub repository alongside the compiler, opam, dune and the ocaml.org website. -
There is a new ocaml/ocaml-library-standard repository where we will work on a documented standard for both dune and ocamlfind to use for the purposes of clean interoperability. This is just starting up this week, and so we will give Gerd and @jeremiedimino some months to establish the common ground between the projects. If anyone has specific asks for features that are not covered by ocamlfind and dune at the moment from a packaging perspective, then this is a good time to get in touch. Note that new feature requests may not make the first version of the spec – we are keen to ensure that the existing status is reflected initially to solve the immediate problem, and so the focus is on documenting the existing interactions between the OCaml compiler, ocamlfind, and dune.