GithubHelp home page GithubHelp logo

choosenim's Introduction

choosenim

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.

Typical usage

$ 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]

Installation

Windows

Download the latest Windows version from the releases page.

Execute the self-extracting archive, or extract the zip archive and run the runme.bat script. Follow any on screen prompts and enjoy your new Nim and choosenim installation.

Unix

curl https://nim-lang.org/choosenim/init.sh -sSf | sh

Optional: You can specify the initial version you would like the init.sh script to install by specifying the CHOOSENIM_CHOOSE_VERSION environment variable.

How choosenim works

Similar to the likes of rustup and pyenv, choosenim is a toolchain multiplexer. It installs and manages multiple Nim toolchains and presents them all through a single set of tools installed in ~/.nimble/bin.

The nim, nimble and other tools installed in ~/.nimble/bin are 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 ~/.choosenim/toolchains. For example running nim will execute the proxy in ~/.nimble/bin/nim, which in turn will run the compiler in ~/.choosenim/toolchains/nim-0.16.0/bin/nim, assuming that 0.16.0 was selected.

How toolchains are installed

Due to lack of official binaries for most platforms, choosenim downloads 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.

Dependencies

Windows Linux macOS (*)
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 openssl version.

Usage

Analytics

Check out the analytics document for details.

Troubleshooting

Development notes

Auto-extracting installer for Windows was created using WinRAR. Instructions available here.

License

MIT

choosenim's People

Contributors

dom96 avatar euantorano avatar genotrance avatar k0pernicus avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.