Documentation

Getting started with Nim

Learn Nim in 5 minutes

A 5-minute tour through Nim.

Nim basics tutorial

For programming beginners. Covers all the basic topics, enough to make your first programming steps.

Official Nim Playground

Compile and run Nim snippets in your browser.

Official tutorials

Tutorial, part 1

A guide about basic and advanced built-in types, statements, control flow, and procedures.

Tutorial, part 2

How to use Object Oriented Programming in Nim, exceptions, generics, and templates.

Macro tutorial

Learn about meta-programming and macros.

Nim for...

... C programmers

This is a guide for people with experience in C or a similar language. The guide assumes some intermediate knowledge, for instance of how stacks and heaps works.

... Python programmers

Nim is much more than "compiled Python", and this tutorial will give you an overview of similarities and differences between the two languages.

... TypeScript/JavaScript programmers

Want to use Nim for your frontend needs? Start here.

Documentation

Standard Library

Provides a listing and description of all the modules in the standard library.

Language Manual

The Nim programming language specification.

Tools Documentation

Description of some tools that come with the standard distribution.

Search

Searchable index

All Nim documents and modules in one place. Use Ctrl/Cmd+F.

Nimble Package Directory

Search for available Nimble packages.

Tutorials

How I Start: Nim

Write an interpreter for the BrainF#@% programming language in Nim.

Nim by Example

A series of short examples covering the most common topics.

Nim Days

Building mini applications with Nim.

Nim Notes

A collection of Nim snippets with brief notes.

Nim memory model

Tutorial explaining essentials of how Nim stores data in memory.

Nim for Beginners

A video series meant to teach Nim programming to people who have never programmed before, or are new to the language.

Blogs

Goran Krampe

OOP in Nim, Arduino and Nim, and more.

HookRace

NES emulator in Nim, SDL2 platformer, writing small binaries, etc.

Peter's DevLog

Options, File handling, stack vs heap (ref) objects, etc.

Other

Compiler User Guide

Outlines the commands and command line flags the Nim compiler supports. Explains how the Nim compiler can be configured and describes how to cross-compile, generate DLLs, and more.

Nim Style Guide

The stylistic conventions that Nim's official projects adhere to.

Nimble Package Manager

Explains configuration and usage of Nimble package manager, including creating and publishing your own packages.

NimScript

Describes the subset of Nim used for configuring Nim and specifying Nimble packages.

Internal Documentation

The internal documentation describes how the compiler is implemented. Read this if you want to hack the compiler.

Nim Backend Integration

Describes the various backends supported by Nim, including C, C++, Obj C, and JS. It also explains how to interface with libraries written in those languages.

Nim exercises on Exercism

Learn and practice Nim by solving small exercises, either in the browser or locally. Exercism is a 100% free, open-source, not-for-profit organization.