choosenim installs the Nim programming language from official downloads and sources, enabling you to easily switch between stable and development compilers.
The aim of this tool is two-fold:
- Provide an easy way to install the Nim compiler and tools.
- Manage multiple Nim installations and allow them to be selected on-demand.
$ choosenim stable Installed component 'nim' Installed component 'nimble' Installed component 'nimgrep' Installed component 'nimsuggest' Switched to Nim 0.16.0 $ nim -v Nim Compiler Version 0.16.0 (2017-01-08) [MacOSX: amd64]
Download the latest Windows version from the releases page.
Execute the self-extracting archive, or extract the zip archive and run
runme.bat script. Follow any on screen prompts and enjoy your
new Nim and choosenim installation.
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
Optional: You can specify the initial version you would like the
script to install by specifying the
How choosenim works
Similar to the likes of
choosenim is a
It installs and manages multiple Nim toolchains and presents them all through
a single set of tools installed in
nimble and other tools installed in
proxies that delegate to the real toolchain.
choosenim then allows you
to change the active toolchain by reconfiguring the behaviour of the proxies.
The toolchains themselves are installed into
nim will execute the proxy in
in turn will run the compiler in
assuming that 0.16.0 was selected.
How toolchains are installed
Due to lack of official binaries for most platforms,
the source and builds it by default. This operation is only performed once
when a new version is selected.
In the future
choosenim will download binaries whenever they are available.
|C compiler||Downloaded automatically||gcc/clang||gcc/clang|
|OpenSSL||>= 1.0.2k||>= 1.0.2k||N/A|
|curl||N/A||N/A||Any recent version|
|zlib||Statically linked in binary||Any recent version||Any recent version|
* Many macOS dependencies should already be installed. You may need to install a C compiler however.
The dependencies shown are recommendations only. You may need to install them, when you do ensure that they are in your PATH.
OpenSSL version can be checked by executing
Check out the analytics document for details.
Auto-extracting installer for Windows was created using WinRAR. Instructions available here.