Contributing
Repository
Section titled “Repository”| Directory | Content |
|---|---|
lib/Target/CSL/Parser3/ |
The parser. |
lib/Dialect/ParsedCSL/ |
The untyped representation and comptime evaluation. |
lib/Conversion/ParsedCSLToTypedCSL/ |
The lowering to the typed representation. |
lib/Dialect/TypedCSL/ |
The typed representation, async lowering and the async runtime. |
lib/Target/CSL/EmitCSL/ |
The emission of CSL. |
tools/ |
csl-pp, the language server and developer tools. |
csl-libs/ |
The csl++ libraries; see Libraries. |
editors/vscode/ |
The VS Code extension. |
conan/ |
Conan recipes for csl++ and its dependencies, and the profiles of continuous integration. |
packaging/ |
The Python package published on PyPI. |
test/ |
Regression tests; test/Integration/ runs programs in the simulator. |
website/ |
This website. |
Building from source
Section titled “Building from source”csl++ is built with CMake and Conan. The build fetches and builds its own copy of LLVM, so it needs no LLVM installation; docs/Building.md in the repository describes the build and the pinning of dependencies in detail.
Requirements: Linux on x86-64, a C++20 compiler, Python 3 and Git. Continuous integration builds on AlmaLinux 8 with GCC 15.
-
Get the source and the Python packages for the build:
Terminal window git clone https://github.com/esa-tu-darmstadt/csl-pp.gitcd csl-pppython3 -m venv .venv. .venv/bin/activatepython3 -m pip install -r conan/requirements.txtconan config install conan/config -
Build. The first build compiles LLVM, which takes considerably longer than csl++ itself; later builds reuse it.
Terminal window conan profile detectpython3 scripts/conan-build.py install --build=missing -pr:a default -s:a compiler.cppstd=20python3 scripts/conan-build.py build -pr:a default -s:a compiler.cppstd=20With GCC 15 first on
PATH,-pr:a rhel8-gcc15selects the profile that continuous integration uses instead. -
Install
csl-ppand the files it needs into a directory of your choice:Terminal window cmake --install build/Release --prefix ~/csl++export PATH=~/csl++/bin:$PATHcsl-ppexpectslib/libinject_mllvm.sonext to itsbindirectory and finds the libraries inshare/csl-mlir/libsof the installation; keep the three together if you copy them elsewhere. Acsl-pprun from the build directory needs thecsl-libsdirectory of the repository with--import-path.
Installation describes how csl-pp finds the Cerebras SDK.
The regression tests need no SDK:
cmake --build build/Release --target check-cslThe integration tests compile and run the examples of the SDK, the ported benchmarks and the examples of this website in the simulator. They need the SDK; configure the build with -DCSL_SDK_DIR=<sdk> and -DCSL_EXTRAS_DIR=<sdk>/csl-extras-<version>, then run:
cmake --build build/Release --target check-csl-integrationWebsite
Section titled “Website”The website is built with Starlight:
cd websitenpm cinpm run dev