LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nim

programming language compiler

TLDR

Compile to executable
$ nim c [program.nim]
copy
Compile and run
$ nim c -r [program.nim]
copy
Release build
$ nim c -d:release [program.nim]
copy
Generate C source without linking
$ nim c --compileOnly [program.nim]
copy
Compile to JavaScript
$ nim js [program.nim]
copy
Compile to C++
$ nim cpp [program.nim]
copy
Check syntax and semantics
$ nim check [program.nim]
copy
Generate HTML documentation
$ nim doc [program.nim]
copy

SYNOPSIS

nim [command] [options] file

DESCRIPTION

nim is the Nim programming language compiler. It compiles to C, JavaScript, and other backends.The tool produces efficient executables. Features Python-like syntax with static typing.

PARAMETERS

COMMAND

Compilation command.
c / compile
Compile to C (default backend).
cpp
Compile to C++.
js
Compile to JavaScript.
objc
Compile to Objective-C.
check
Validate syntax and semantics without code generation.
doc
Generate HTML documentation from source.
-r, --run
Run the program after compilation.
-c, --compileOnly
Generate code without linking.
-d:release
Enable release optimizations.
-d:danger
Disable all runtime checks for maximum speed.
-o:FILE
Set the output filename.
--opt:speed|size|none
Optimization target.
--mm:arc|orc|refc
Select memory management strategy.
--threads:on
Enable multithreading support.
-f, --forceBuild
Force full rebuild of all modules.
--help
Display help information.

CAVEATS

Requires C compiler for native builds. Garbage collected by default. Growing ecosystem.

HISTORY

Nim was created by Andreas Rumpf starting in 2005, originally named Nimrod.

SEE ALSO

nimble(1), gcc(1), python(1)

Copied to clipboard
Kai