Basic Usage

Copy the Cook executable ("cook" under Linux or "cook.exe" under Windows) to project root directory. If your project contains default main file ("main.d"), you simply run it:

  $ ./cook

Otherwise, you should specify the main file ("target" in our terminology):

  $ ./cook mainfile.d

You can omit the extension:

  $ ./cook mainfile

This is useful when your project contains more than one target. You can configure and build each of them individually.

That is all! Cook will automatically call DMD to compile and link your modules. It will also create a cache file (usually with the same name as the target) to store all the metadata like module dependencies, modification times etc. Don't delete it unless you really need to do so: caching dramatically increases building speed. If you don't want Cook to read/write cache file, run it with "-nocache" parameter:

  $ ./cook --nocache mainfile