Skip to content

Installation

csl++ is distributed as the Python package csl-pp, which contains the compiler csl-pp, the language server csl-lsp-server and the csl++ libraries. The package is built for x86-64 Linux with glibc 2.28 or newer.

Install the package with pipx, which puts the commands on your PATH in an environment of their own:

Terminal window
pipx install csl-pp

uv tool install csl-pp, or pip install csl-pp in a virtual environment, work as well. Check the installation with:

Terminal window
csl-pp --version

It prints the csl++ release, its commit and the LLVM version. Release candidates are published as pre-releases; pipx install --pip-args=--pre csl-pp installs the latest one.

csl-pp runs cslc of the Cerebras SDK, which is installed separately; csl++ is tested with SDK 2.10. Put the SDK directory, which contains cslc, on your PATH:

Terminal window
export PATH=~/cerebras-sdk:$PATH

csl-pp then runs that cslc. It reads the system modules of the SDK, such as <memcpy/memcpy>, from the SDK image (*.sif) in the same directory.

To use another cslc or another image, pass --cslc=<path> and --system-module-sif=<path>. Both can be set once in the environment variable CSL_FLAGS, which every csl-pp run reads:

Terminal window
export CSL_FLAGS="--cslc=$HOME/cerebras-sdk/cslc --system-module-sif=$HOME/cerebras-sdk/sdk-cbcore-2.10.0.sif"

Host programs run with the cs_python of the SDK, as before.

The VS Code extension provides diagnostics, hover, completion, signature help and go-to-definition for CSL and csl++. It is installed from the Visual Studio Marketplace and contains the language server, so it needs neither the package nor a build of csl++. Only a program that imports the csl++ libraries needs the server of the package; see csl++ libraries.

The package is the recommended way to install csl++. Contributing describes the build from source, for development or for platforms that the package does not cover.

The Quickstart compiles a first program with the installed csl-pp.