download.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. Download the compiler
  2. =====================
  3. You can download the latest version of the Nim compiler here.
  4. Windows
  5. -------
  6. Zips
  7. %%%%
  8. Since the website moved to https, only installation via the provided zipfiles
  9. is supported:
  10. * | 32 bit: `nim-0.16.0_x32.zip <download/nim-0.16.0_x32.zip>`_
  11. | SHA-256 69af94a6875a02543c1bf0fa03c665f126f8500a2c0e226c32571e64c6842e57
  12. * | 64 bit: `nim-0.16.0_x64.zip <download/nim-0.16.0_x64.zip>`_
  13. | SHA-256 e667cdad1ae8e9429147aea5031fa8a80c4ccef6d274cec0e9480252d9c3168c
  14. Unzip these where you want and **optionally** run ``finish.exe`` to
  15. detect your MingW environment. (Though that's not reliable yet.)
  16. You can find the required DLLs here, if you lack them for some reason:
  17. * | 32 and 64 bit: `DLLs.zip <download/dlls.zip>`_
  18. | SHA-256 198112d3d6dc74d7964ba452158d44bfa57adef4dc47be8c39903f2a24e4a555
  19. These versions of mingw are known to work:
  20. * | 32 bit: `mingw32-6.3.0 <download/mingw32-6.3.0.7z>`_
  21. | SHA-256 1239a56d4c42e146b2cb25dc4d0871bd83f569d0a51a9198e84d010e0a75745a
  22. * | 64 bit: `mingw64-6.3.0 <download/mingw64-6.3.0.7z>`_
  23. | SHA-256 9a23d12d96a10e67093c1f2042275c6a7d29da9e2ead573d0f24f4a6d53761a1
  24. Installation based on generated C code
  25. --------------------------------------
  26. **Note:** The Nim compiler requires a C compiler to compile software. On
  27. Windows we recommend that you use
  28. `Mingw-w64 <http://mingw-w64.sourceforge.net/>`_. GCC is recommended on Linux
  29. and Clang on Mac. The Windows installers above already includes a C compiler.
  30. This installation method is the preferred way for Linux, Mac OS X, and other Unix
  31. like systems.
  32. Firstly, download this archive:
  33. * | `nim-0.16.0.tar.xz (2.9MB) <download/nim-0.16.0.tar.xz>`_
  34. | SHA-256 9e199823be47cba55e62dd6982f02cf0aad732f369799fec42a4d8c2265c5167
  35. Extract the archive. Then copy the extracted files into your chosen installation
  36. directory, ideally somewhere in your home directory.
  37. For example: ``~/programs/nim``.
  38. Now open a terminal and follow these instructions:
  39. * ``cd`` into your installation directory, for example by executing
  40. ``cd ~/programs/nim``.
  41. * run ``sh build.sh``.
  42. * Add ``$your_install_dir/bin`` to your PATH.
  43. * To build associated tools like ``nimble`` and ``nimsuggest`` run ``nim c koch && ./koch tools``.
  44. After restarting your terminal, you should be able to run ``nim -v``
  45. which should show you the version of Nim you just installed.
  46. There are other ways to install Nim (like using the ``install.sh`` script),
  47. but these tend to cause more problems.
  48. Bleeding edge installation from GitHub
  49. --------------------------------------
  50. `GitHub <http://github.com/nim-lang/nim>`_ is where Nim's development takes
  51. place. You may wish to grab the latest development version of Nim, because
  52. sometimes bug fixes and new features may not have made it to an official
  53. release yet. In those circumstances you are better off grabbing the
  54. current development branch.
  55. You will also need to do this if you would like to contribute to Nim.
  56. Before you download the code, open a new terminal and ``cd`` into the
  57. directory where you would like the download to take place.
  58. The following commands can be used to download the current development branch
  59. and then to build it::
  60. git clone https://github.com/nim-lang/Nim.git
  61. cd Nim
  62. git clone --depth 1 https://github.com/nim-lang/csources
  63. cd csources && sh build.sh
  64. cd ..
  65. bin/nim c koch
  66. ./koch boot -d:release
  67. You should then add the ``./bin`` (make sure to expand this into an
  68. absolute path) directory to your ``PATH``.
  69. Docker Hub
  70. ----------
  71. The `official Docker images <https://hub.docker.com/r/nimlang/nim/>`_
  72. are published on Docker Hub and include the compiler and Nimble. There are images
  73. for standalone scripts as well as Nimble packages.
  74. Get the latest stable image::
  75. docker pull nimlang/nim
  76. The latest development version::
  77. docker pull nimlang/nim:devel