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.

INSTALL

sudo pacman -S nim
copy
sudo apk add nim
copy
sudo zypper install nim
copy
brew install nim
copy
nix profile install nixpkgs#nim
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid