Why choose Shake?

Shake is a library for writing build systems. Most large projects have a custom-written build system, and developers working on the project are likely to run the build system many times a day, spending a noticeable amount of time waiting for the build system. This document explains why you might pick Shake over alternative tools for writing build systems (e.g. make, Ant, Scons). Shake primarily benefits two groups of people:

In the rest of this document we explain and justify the above claims. Shake combines cutting edge research with a robust industrial-quality implementation. Shake is in constant use at many large organisations, including a large investment bank, where it was originally developed and has been in use since 2009.

Expresses many types of build rule

Build systems run user supplied commands in an order satisfying dependencies. Many of the advantages of Shake are due to being able to express more powerful dependencies than other build tools. These dependency features ensure you can express the build system you want directly, without having to shoehorn your ideas into whatever dependencies your build tool provides. In particular, Shake can express both more dependencies (so things rebuild when they should) and more fine-grained dependencies (so things don't rebuild because something nearby changed).

Build systems run quickly

Developers are likely to spend a long time waiting for their build system, and consequently Shake is designed to be fast.

Build systems run reliably

A build system is responsible for producing the files that developers are working with, so it is crucial that developers trust the result so they can properly investigate issues without considering build system involvement.

Requires little manual intervention

Most build systems occasionally require manual intervention, typically wiping the existing build and starting again, when the build system developers change something fundamental. Shake eliminates the need for any manual intervention, reducing time wasted by users of the build system.

Reports estimated completion time

Shake can report estimated completion time, allowing developers to plan their time better.

Powerful language

Shake is implemented as a Haskell library, and Shake build systems are structured as Haskell programs which make heavy use of the Shake library functions. Shake is a delicate balance, providing access to the full power of Haskell (so build systems are not limited), yet also not requiring Haskell knowledge (suitable for any programmer).

Supports large robust systems

Shake build systems can scale to tens of thousands of lines without becoming unwieldy.

Provides profiling information

Shake can generate profiling information allowing developers to both understand the current system, and identify opportunities for improvement.

Why not?

This document sets out the reasons you should use Shake, but naturally there are some disadvantages: