Build Systems for OCaml

For discussing how to build OCaml code, including OCaml-specific build systems (e.g., ocamlbuild, ocp-build, jbuilder, jenga) and for use of general purpose build systems.

2 Likes

I’ve recategorised this in the new build system category.

1 Like

I continue to use makefiles for this. The reason is that it is easy to extend, since makefiles are just shell-scripts written from a special perspective. Macros I wrote and use are described here. There are a few rough edges, but I’ll fix them eventually.

1 Like

Not gonna lie, jbuilder, the new build system backed by Jane Street is pretty tight. It’s pretty easy to get setup, builds very fast, autogenerates merlin files, has support for multiple build contexts, and is under active development. Internally, I believe it defines a DSL which builds a dependency graph for all the targets and functionally composes actions using arrows to build each target.

I think it has a very promising future (no pun intended).

PS: I forgot to mention, it also builds your project in parallel.

7 Likes