2.1. Installing Clash¶
Check out clash-lang.org/install to install the latest stable release of Clash, or to setup a Clash project.
2.1.1. Get Clash from source¶
Get the source code using Git and enter the cloned directory:
git clone git@github.com:clash-lang/clash-compiler.git
# Alternatively, if you haven't setup SSH keys with GitHub:
# git clone https://github.com/clash-lang/clash-compiler.git
cd clash-compiler
To check out a released version, use:
git checkout v1.2.3
To checkout a release branch use:
git checkout 1.2
Note that release branches might contain non-released patches.
2.1.1.1. Cabal¶
To use Cabal you need both Cabal and GHC installed on your system. For Linux and MacOS users we recommend using ghcup. Windows users are recommended to use the Haskell Platform.
To run clash use:
cabal v2-run --write-ghc-environment-files=always -- clash
If this fails, make sure you’ve got an up-to-date package index:
cabal update