Skip to content

Instantly share code, notes, and snippets.

@NullCode1337
Last active April 3, 2024 04:27
Show Gist options
  • Save NullCode1337/95addeca955456c92aeb9fbc26f3615a to your computer and use it in GitHub Desktop.
Save NullCode1337/95addeca955456c92aeb9fbc26f3615a to your computer and use it in GitHub Desktop.
How to install the Nim Compiler on your Windows PC

Installing Nim on Windows

What is Nim?

Nim is a (pretty obscure) "statically typed compiled systems programming language". It's unique because the syntax is very reminiscent of Python, while being a compiled language (; anyone?), hence making it accessible to Python devs. Now let's cut to the chase - how to install this:

Installing Nim

Method 1: The boring:tm:

(Powershell only)

  1. Install chocolatey
  2. choco install nim

OR (x64 only)

  1. Download and use ChooseNim

Method 2: The manual:tm:

The manual way is (imho) one of best ways to install Nim, because it just works.

Here's how to do it:

  • Make sure you have an archiving software beforehand [for extracting files]
  1. Go to https://nim-lang.org/install_windows.html
  2. First, download the MinGW version depending on your architecture

mingw download

  1. Extract the MinGW zip to wherever you want (I personally like C:\Nim\MinGW)
  2. Add the bin directory to PATH (Google it honey)
  3. Reboot the system for good luck
  4. Now that that's done, download the Nim zip (this has the compiler, stdlib, etc AIO) depending on your architecture

nim download

  1. Extract the Nim zip to C:\Nim, and run finish.exe. That tool will guide you through the rest.
  2. Now you have nim, nimble (Nim's package manager) as well as the entire MinGW suite
  3. Profit! (If it doesn't work, reboot again!)

Post-Installation

nimble needs git to download and install packages automagically. You can always install manually of course (Download repo as zip, cd and nimble install), but we all know automatic is based

Credits

  • Nim creators and contributors
  • Nim Discord
  • me ofcourse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment