harness.rb

I find that when I need a build system for my personal projects I am often not satisfied (insert standard build system rant).

Enter harness.rb, a monolithic project harness (build system) distributed as a single Ruby file, which is to be vendored with the accompanying project. Its main features are that it is entirely written in Ruby, including using Ruby as the language to specify the build targets, and that it does not have any mechanism to use command-line arguments to control build options (can't have configuration errors if you can't have any ephemeral configuration). Additionally it comes with embedded documentation, ZSH completions, multi-process support, and a self-test.

Like all build systems, harness.rb has its quirks, the main one being that harness.rb is designed for compiled languages, so everything that has a test or run step must also have a build step. I consider this okay because you can always just define a build step that does nothing and succeeds (again, since everything is in Ruby).

The harness is currently around 850 source lines of code (SLOC), and the goal is to keep it under 1000 SLOC to ensure it stays easily understandable and extensible.

Links