2. Installation

The latest release of CAISAR is available as an opam package or a Docker image on GNU/Linux. CAISAR is available on Windows either under the Windows Subsystem Linux (WSL) or the aforementioned docker image.

The development version of CAISAR is available only by compiling the source code. CAISAR needs access to a python3 interpreter, which is a default in all major GNU/Linux distributions.

2.1. Install through Opam

This method requires requires the OCaml package manager (Opam) v2.1 or higher to be installed in your system. It is typically avaible in all major GNU/Linux distributions.

To install CAISAR via opam, do the following:

$ opam install caisar

2.2. Install through Docker

This method requires Docker to be installed in your system. A ready-to-use Docker image of CAISAR is available on Docker Hub. To retrieve it, do the following:

$ docker pull laiser/caisar:pub

Alternatively, a Docker image for CAISAR can be created locally by proceeding as follows:

$ git clone https://git.frama-c.com/pub/caisar
$ cd caisar
$ make docker

To run the CAISAR Docker image, do the following:

$ docker run -it laiser/caisar:pub sh

2.3. Install through Nix

This method requires Nix (version 2.15 or above) to be installed on your system.

2.3.1. From Nixpkgs

CAISAR is currently not directly available on Nixpkgs. This should change for the future release.

2.3.2. Using Nix flake

A CAISAR flake is available at the root of CAISAR directory. At the time of writing, flakes are still considered experimental by NixOS. Hence, to use it, you will need to enable them following the official Nix instructions.

Assuming you have Nix installed and are at the CAISAR repository root, you can build CAISAR using the following command:

$ nix build

Warning

This command will fetch the Nixpkg registry for all build dependencies. This will result in several megabytes download. Make sure you have a stable network connexion before attempting building through Nix.

The CAISAR binary will reside in result/bin/caisar. The manual will be under result/share/doc/ocaml4.14.1-caisar-${VERSION}/.

You can run the CAISAR test suite using the following command:

$ nix flake check

You can setup a development environment with all CAISAR dependencies included using nix develop. It will contain the ocaml toolchain already setup and installed, and the ocaml language server and formatter. You can thus compile and test CAISAR in an isolated shell.

$ nix develop

2.4. Compile from source

To build and install CAISAR, do the following (this may take some time, as it will download a full OCaml toolchain, required dependencies and compile them):

$ git clone https://git.frama-c.com/pub/caisar
$ cd caisar
$ opam switch create --yes --no-install . 4.13.1
$ opam install . --deps-only --with-test --yes
$ make
$ make install

To run the tests:

$ make test