Hello world
Create the following file in your favorite text editor:
helloworld.nimecho "Hello World"
Compile it:
and execute it as any other binary:
You can compile and execute it in one shot:
nim c -r helloworld.nim
...
...
...
Hello World
And you can avoid all the non essential messages by doing:
nim c -r --verbosity:0 helloworld.nim
Visit Nim Compiler User Guide, to find out about what can be done with Nim's compiler.
Release mode
Don't forget to compile using release mode when you intend to release the binary. This is required in order to achieve the expected performance:
nim c -r -d:release helloworld.nim