Terrateam's open source Ocaml repository

At the time (this is coming close to 15 years ago) the build system space in Ocaml was pretty limited. I don’t even think jbuilder existed then? So I built my own.

The upsides of pds is that most everything is defined in a TOML file, which I can then consume for other use cases. For example I have another tool called hll that automatically generates opam releases for me. Writing scripts against TOML is pretty easy. Also, because it compiles down to makefiles, doing all the hoops to build ctypes to C back to Ocaml was possible without any special knowledge of that in pds.

A design feature of pds is that, while it natively supports Ocaml, as long as a directory implements the makefile interface, it can be incorporated in the build. So other languages are easy to work with. I build out tailwind css files as part of our front-end build process, for example.

pds also benefits from being one Ocaml file (+ some Makefile templates), so it’s pretty simple.

Downsides, of course, are that really makefiles are part of the interface of pds. So even though pds is simple, in reality it’s pds + makefiles.

Currently, dune does not solve all the problems that pds solves for me. And even if it had feature parity (including simplicity) with pds, dune isn’t the 10x better such that I’d feel compelled to switch.

What might force me to switch to dune, unhappily, is more and more tools are or will start depending on dune, I suspect. ocamllsp had a hard-dune dependency for a little while and they added a fallback to .merlin file, which I am very appreciative for, but also maybe is a sign for the future.

5 Likes