Idris2-boot/INSTALL.md
Edwin Brady 2c2acdcfac Reorganise build system to go via generating C
This has two main advantages: firstly, it actually makes the build slightly
faster and less memory intensive, because Idris doesn't fork a new
process and eat all the memory! Secondly, it means we can build a
distribution with the C file, for building on machines which don't have
Idris 1 available.

Also includes a script for building such a distribution.

I expect someone who is better a writing Makefiles than me can tidy this
up. There are almost certainly problems on Windows too - please help if
you can!

There are new Make targets 'all-fromc' and 'install-fromc' which don't
require building from Idris source, so that we can build with no Idris 1
available.

A small consequence: make install-exec no longer builds the idris2
executable, just installs it.
2020-03-05 17:16:20 +00:00

2.4 KiB

Installation

Idris 2 is built using Idris, and provides support for two default code generation targets: Chez Scheme, and Racket. To build from source, it requires at least Idris version 1.3.2 (see https://www.idris-lang.org/download). You can also build from the generated C.

Quick summary:

You need a C compiler (default is clang) and Chez Scheme, and optionally Idris 1.3.2 to build from source.

  • If you have Idris 1.3.2 installed:

    make install

  • If not, and the generated C is available in dist, you can install directly from the generated C:

    make install-fromc

The generated C is available in source distributions. It will not be available if you have cloned directly from https://github.com/edwinb/Idris2

The above commands will build the executable, build the libraries, run the tests (if Idris 1 is available), then if all is well, install everything. The default installation directory is $HOME/.idris2. You can change this by setting the PREFIX variable in the Makefile.

Idris

There are several sets of instructions on how to install Idris from source and binary.

Code Generation Targets

Only one of these is absolutely necessary, and you can type check code even with none of them installed. The default code generator targets Chez Scheme.

Chez

Chez Scheme is available to build from source:

Many popular package managers will provide a binary distribution for Chez. Note that homebrew for Mac OS X provides a version without multithreading support, so Mac OS X users will want to build from source.

Note: If you install ChezScheme from source files, building it locally, make sure you run ./configure --threads to build multithreading support in.

Chicken

Chicken scheme offers binary distributions (and source tar balls) from

You can find chicken in many a package manager.

After installing chicken scheme you may need to install the 'numbers' package.

Racket

Racket is available from: