XUtils

reggae

meta build system in D


i.e., contains a dub.{sdl,json} file):

mkdir build cd build reggae ..

equivalent to “dub build”:

ninja

equivalent to “dub test – ”:

ninja ut && ./ut

build both default and unittest targets in parallel:

ninja default ut


For advanced use cases, reggae provides an API to use dub build information
in a `reggaefile.d` build description file. A simple example for building
production and unittest binaries concurrently is this:

```d
import reggae;
alias main = dubBuild!(CompilerFlags("-g -debug"));
alias ut = dubBuild!(Configuration("unittest"));
mixin build!(main, ut);

Scripting language limitations

Build written in one of the scripting languages currently:

  • Can only detect changes to the main build description file (e.g. reggaefile.py), but not any other files that were imported/required
  • Cannot use the binary backend
  • Do not have access to the dub high-level rules

These limitations are solely due to the features not having been implemented yet.

Building Reggae

To build reggae, you will need a D compiler. The dmd reference compiler is recommended. Reggae can build itself. To bootstrap, either use dub (dub build) or the included bootstrap script. Call it without arguments for make or with one to choose another backend, such as ninja. This will create a reggae binary in a bin directory then call itself to generate the “real” build system with the requested backend. The reggae-enabled build includes a unit test binary.


Articles

  • coming soon...