pds is my own build system. It can be installed by doing:
opam install pds
pds is a build system which takes a TOML files and a directory of Ocaml code and produces Makefiles which will build the code and can be used to run tests.
Why?
When I created pds I surveyed the existing build tools and I found them either too complicated and/or required a learning a new configuration or build language. The configuration/build language was also difficult to consume with other tools. I decided I wanted something that would take a simple configuration file in a fairly standard language and build the software.
Strengths
- Configuration language is TOML, a pretty straight forward language. This means the build config can be easily read by other tools. For example, hll is used to takes a pds configuration and generates an opam package.
merlin-of-pdscreates a.merlinfile from a pds configuration. - Supports different kinds of builds existing at the same time. pds produces output in the
builddirectory, which is broken up intorelease, anddebugbuilds. Just domakeormake debugto make the different kinds. Both can co-exist. - It builds in parallel, both across projects and within (if possible).
- It knows how to build Ocaml projects but it also supports
third-partyproject which can be in any language, they just require a Makefile that implements some predefined targets. - Is capable of building some complicated builds, so far it’s been tested with some wild Ctypes builds which require compiling C code as an intermediate.
- pds solves the 80% of builds issue simply and allows more complicated builds via extension with Makefiles.
Weaknesses
- It has only been tested for my needs so I don’t know how generic it is. But for simple builds it should be good enough.
- It uses Makefiles with multiple invocations underneath so large projects can be slower than desired (but still not so bad, IMO). One repository I have has 11056 lines of code (wc -l) over 26 projects. On my laptop a
make -j1builds in 31 seconds, amake -j4builds in 20 seconds. Part of that is dependencies between projects and some of it ismakeoverhead. - It uses Makefiles as its extension language, which is used for more interesting/complicated builds, which can be non-trivial. This was decided to keep pds simple for the 80% case and let power users do more complicated builds as needed.
To read more about pds see the following blog post: