Scroll to navigation

NIM(1) User Commands NIM(1)

NAME

nim - Nim Language Compiler

DESCRIPTION

Nim Compiler Version 1.6.10 [Linux: amd64] Compiled at 2022-11-23 Copyright © 2006-2021 by Andreas Rumpf ::

nim command [options] [projectfile] [arguments]

Command:

compile project with default code generator (C)
compile to $nimcache/projname, run with [arguments] using backend specified by `--backend` (default: c)
generate the documentation for inputfile for backend specified by `--backend` (default: c)

Arguments:

arguments are passed to the program being run (if --run option is selected)

OPTIONS

add path to search paths
define a conditional symbol (Optionally: Define the value for that symbol, see: "compile time define pragmas")
undefine a conditional symbol
force rebuilding of all modules
turn stack tracing on|off
turn line tracing on|off
turn support for multi-threading on|off
turn all runtime checks on|off
turn assertions on|off
optimize not at all or for speed|size Note: use -d:release for a release build!
use native debugger (gdb)
generate a console app|GUI app|DLL|static library
-r, --run
run the compiled program with given arguments
evaluate nim code directly; e.g.: `nim --eval:"echo 1"` defaults to `e` (nimscript) but customizable: `nim r --eval:'for a in stdin.lines: echo a'`
show all command line switches
show this help
show detailed version information

Note, single letter options that take an argument require a colon. E.g. -p:PATH.

REPORTING BUGS

https://github.com/nim-lang/Nim/issues

SEE ALSO

The nim-doc package.

November 2022 nim 1.6.10-1