Nim maintenance script

  Source   Edit

Version:0.1.0-dev.21320

"A great chef is an artist that I truly respect" -- Robert Stack.

Introduction

The koch program is Nim's maintenance script. It is a replacement for make and shell scripting with the advantage that it is much more portable. The word koch means cook in German. koch is used mainly to build the Nim compiler, but it can also be used for other tasks. This document describes the supported commands and their options.

Commands

boot command

The boot command bootstraps the compiler, and it accepts different options:

-d:release
By default a debug version is created, passing this option will force a release build, which is much faster and should be preferred unless you are debugging the compiler.
-d:useLinenoise
Use the linenoise library for interactive mode (not needed on Windows).

After compilation is finished you will hopefully end up with the nim compiler in the bin directory. You can add Nim's bin directory to your $PATH or use the install command to place it where it will be found.

csource command

The csource command builds the C sources for installation. It accepts the same options as you would pass to the boot command.

temp command

The temp command builds the Nim compiler but with a different final name (nim_temp), so it doesn't overwrite your normal compiler. You can use this command to test different options, the same you would issue for the boot command.

test command

The test command can also be invoked with the alias tests. This command will compile and run testament/tester.nim, which is the main driver of Nim's test suite. You can pass options to the test command, they will be forwarded to the tester. See its source code for available options.

pdf command

The pdf command builds PDF versions of Nim documentation: Manual, Tutorial and a few other documents. To run it one needs to install Latex/xelatex first.