Skip to content

Getting started: setup and builds

Follow the official installation guide, then verify the compiler and Nimble:

nim --version
nimble --version

Create hello.nim:

echo "Hello, Nim!"

Compile it, or compile and run it:

nim c hello.nim
nim c -r hello.nim

A first release build might look like:

nim c -d:release -o:bin/myapp src/main.nim

For a multi-file project, create Nimble metadata and use its build/test tasks:

mkdir my-nim-app
cd my-nim-app
nimble init
nimble build
nimble test

Use nim c -r for a small development loop, run tests in CI, and validate each target platform before adding FFI or alternate backends. Continue with language basics.