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 csl-pp
Section titled “Install csl-pp”Install the package with pipx, which puts the commands on your PATH in an environment of their own:
pipx install csl-ppuv tool install csl-pp, or pip install csl-pp in a virtual environment, work as well. Check the installation with:
csl-pp --versionIt 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.
Set up the Cerebras SDK
Section titled “Set up the Cerebras SDK”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:
export PATH=~/cerebras-sdk:$PATHcsl-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:
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.
Editor support
Section titled “Editor support”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.
Building from source
Section titled “Building from source”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.