123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Nim maintenance script</title>
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
- <!-- JS -->
- <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
- </head>
- <body>
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">Nim maintenance script</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-select-wrapper">
- <label for="theme-select">Theme: </label>
- <select id="theme-select" onchange="setTheme(this.value)">
- <option value="auto">🌗 Match OS</option>
- <option value="dark">🌑 Dark</option>
- <option value="light">🌕 Light</option>
- </select>
- </div>
- <div id="global-links">
- <ul class="simple-boot">
- <li><a href="manual.html">Manual</a></li>
- <li><a href="lib.html">Standard library</a></li>
- <li> <a id="indexLink" href="theindex.html">Index</a></li>
- <li><a href="compiler/theindex.html">Compiler docs</a></li>
- <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
- <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="search" id="searchInput"
- oninput="search()" />
- </div>
- <div class="search-groupby">
- Group by:
- <select onchange="groupBy(this.value)">
- <option value="section">Section</option>
- <option value="type">Type</option>
- </select>
- </div>
- <ul class="simple simple-toc" id="toc-list">
- <li><a class="reference" id="introduction_toc" href="#introduction">Introduction</a></li>
- <li><a class="reference" id="commands_toc" href="#commands">Commands</a></li>
- <ul class="simple"><li><a class="reference" id="commands-boot-command_toc" href="#commands-boot-command">boot command</a></li>
- <li><a class="reference" id="commands-csource-command_toc" href="#commands-csource-command">csource command</a></li>
- <li><a class="reference" id="commands-temp-command_toc" href="#commands-temp-command">temp command</a></li>
- <li><a class="reference" id="commands-test-command_toc" href="#commands-test-command">test command</a></li>
- <li><a class="reference" id="commands-web-command_toc" href="#commands-web-command">web command</a></li>
- <li><a class="reference" id="commands-pdf-command_toc" href="#commands-pdf-command">pdf command</a></li>
- </ul>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <a href="https://github.com/nim-lang/Nim/tree/devel/doc/koch.md#L1" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/doc/koch.md#L1" class="link-seesrc" target="_blank" >Edit</a>
- <div id="tocRoot"></div>
-
- <p class="module-desc"><table class="docinfo" frame="void" rules="none"><col class="docinfo-name" /><col class="docinfo-content" /><tbody valign="top"><tr><th class="docinfo-name">Version:</th><td>2.3.1</td></tr>
- </tbody></table><blockquote class="markdown-quote"><p>"A great chef is an artist that I truly respect" -- Robert Stack.</p></blockquote>
- <h1><a class="toc-backref" id="introduction" href="#introduction">Introduction</a></h1><p>The <span id="koch_1">koch</span> 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 <em>koch</em> means <em>cook</em> in German. <tt class="docutils literal"><span class="pre"><span class="program">koch</span></span></tt> 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.</p>
- <h1><a class="toc-backref" id="commands" href="#commands">Commands</a></h1>
- <h2><a class="toc-backref" id="commands-boot-command" href="#commands-boot-command">boot command</a></h2><p>The <span id="boot_1">boot</span> command bootstraps the compiler, and it accepts different options:</p>
- <div class="option-list"><div class="option-list-item odd"><div class="option-list-label"><tt><span class="option">-d:release</span></tt></div><div class="option-list-description">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.</div></div>
- <div class="option-list-item"><div class="option-list-label"><tt><span class="option">-d:nimUseLinenoise</span></tt></div><div class="option-list-description">Use the linenoise library for interactive mode (not needed on Windows).</div></div>
- <div class="option-list-item odd"><div class="option-list-label"><tt><span class="option">-d:leanCompiler</span></tt></div><div class="option-list-description">Produce a compiler without JS codegen or documentation generator in order to use less RAM for bootstrapping.</div></div>
- </div><p>After compilation is finished you will hopefully end up with the nim compiler in the <tt class="docutils literal"><span class="pre"><span class="Identifier">bin</span></span></tt> directory. You can add Nim's <tt class="docutils literal"><span class="pre"><span class="Identifier">bin</span></span></tt> directory to your <tt class="docutils literal"><span class="pre"><span class="Operator">$</span><span class="Identifier">PATH</span></span></tt> or use the install command to place it where it will be found.</p>
- <h2><a class="toc-backref" id="commands-csource-command" href="#commands-csource-command">csource command</a></h2><p>The <span id="csource_1">csource</span> command builds the C sources for installation. It accepts the same options as you would pass to the <a class="reference external" href=" #commands-boot-command">boot command</a>.</p>
- <h2><a class="toc-backref" id="commands-temp-command" href="#commands-temp-command">temp command</a></h2><p>The temp command builds the Nim compiler but with a different final name (<tt class="docutils literal"><span class="pre"><span class="program">nim_temp</span></span></tt>), so it doesn't overwrite your normal compiler. You can use this command to test different options, the same you would issue for the <a class="reference external" href="#commands-boot-command">boot command</a>.</p>
- <h2><a class="toc-backref" id="commands-test-command" href="#commands-test-command">test command</a></h2><p>The <span id="test_1">test</span> command can also be invoked with the alias <tt class="docutils literal"><span class="pre option">tests</span></tt>. This command will compile and run <tt class="docutils literal"><span class="pre">testament/tester.nim</span></tt>, which is the main driver of Nim's test suite. You can pass options to the <tt class="docutils literal"><span class="pre option">test</span></tt> command, they will be forwarded to the tester. See its source code for available options.</p>
- <h2><a class="toc-backref" id="commands-web-command" href="#commands-web-command">web command</a></h2><p>The <span id="web_1">web</span> command converts the documentation in the <tt class="docutils literal"><span class="pre"><span class="Identifier">doc</span></span></tt> directory from rst to HTML. It also repeats the same operation but places the result in the <tt class="docutils literal"><span class="pre">web/upload</span></tt> which can be used to update the website at <a class="reference external" href="https://nim-lang.org">https://nim-lang.org</a>.</p>
- <p>By default, the documentation will be built in parallel using the number of available CPU cores. If any documentation build sub-commands fail, they will be rerun in serial fashion so that meaningful error output can be gathered for inspection. The <tt class="docutils literal"><span class="pre option">--parallelBuild:n</span></tt> switch or configuration option can be used to force a specific number of parallel jobs or run everything serially from the start (<tt class="docutils literal"><span class="pre"><span class="Identifier">n</span> <span class="Operator">==</span> <span class="DecNumber">1</span></span></tt>).</p>
- <h2><a class="toc-backref" id="commands-pdf-command" href="#commands-pdf-command">pdf command</a></h2><p>The <span id="pdf_1">pdf</span> command builds PDF versions of Nim documentation: Manual, Tutorial and a few other documents. To run it one needs to <a class="reference external" href="https://www.latex-project.org/get">install Latex/xelatex</a> first. </p>
- </p>
-
- </div>
- </div>
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br>
- <small style="color: var(--hint);">Made with Nim. Generated: 2025-03-15 14:12:49 UTC</small>
- </div>
- </div>
- </div>
- <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
-
- </body>
- </html>
|