https://github.com/spcl/cppless
https://github.com/spcl/cppless
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spcl/cppless
- Owner: spcl
- Created: 2022-03-02T10:09:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-06T23:32:07.000Z (6 months ago)
- Last Synced: 2026-03-28T00:37:13.250Z (3 months ago)
- Language: C++
- Size: 344 KB
- Stars: 10
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Cppless
Cppless is a single-source programming model for high-performance serverless. It enables you to write applications that offload work to serverless services, without the need to write the glue code needed to connect them.
The architecture of the compiler, including benchmark evaluation, details can be found in the thesis [Cppless: A single-source programming model for high-performance serverless](https://mcopik.github.io/assets/pdf/students/2022_cppless_moeller.pdf).
When using Cppless, please cite our ACM TACO paper (to appear). An extended version of our paper is available on [arXiv](https://arxiv.org/abs/2401.10834).
```
@article{cppless2025,
author = {Copik, Marcin and M\"{o}ller, Lukas and Calotoiu, Alexandru and Hoefler, Torsten},
title = {Cppless: Single-Source and High-Performance Serverless Programming in C++},
year = {2025},
issue_date = {September 2025},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {22},
number = {3},
issn = {1544-3566},
url = {https://doi.org/10.1145/3747841},
doi = {10.1145/3747841},
journal = {ACM Trans. Archit. Code Optim.},
month = sep,
articleno = {110},
numpages = {27},
}
```
## Building and installing
Building applications that use cppless requires using a custom fork of the clang compiler. The modified version of the llvm-project is included as a submodule in the repository, it can be built by following these steps:
- fetch the submodule
- `git submodule update --init --recursive` (this will fetch only the latest revision, but will sped up the download)
- Shallow clones cannot be used for contributing, you'll need to unshallow the clone in order to be able to commit changes to the submodule.
- run `mkdir build && cd build` in the root of the repository (`llvm-project` doesn't support in-tree builds)
- run `cmake -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm`
- This will build the modified `clang` compiler in a release configuration
- run `make clang` (or `make clang -j ` if you want multiple tasks to run in parallel)
- this should produce a `clang` (and `clang++`) executable in the `build/bin` directory
The cmake configuration of this project will automatically use the `clang` executable from the `build/bin` directory, if you want to use cppless in your own project you'll have to instruct your build tool to use that version of clang accordingly
See the [BUILDING](BUILDING.md) document.
### ARM Cross-compilation
To deploy ARM functions from an x86 system, check the documentation on setting up sysroot and toolchain in `cmake/toolchains/aarch64`.
### Compatibility issues with stdlibc++
The Clang's verison, on which Cppless is based, should work with the gcc-based libstdc++ toolchain until version 11.
If your OS has a new version, you need tell CMake to use a different toolchain to avoid potential incompatibilities.
Easiest way to do this:
```
mkdir -p toolchain/lib/gcc/x86_64-linux-gnu
cd toolchain/lib/gcc/x86_64-linux-gnu
ln -sfn /usr/lib/gcc/x86_64-linux-gnu/11 .
```
And in CMakeLists.txt add the following line:
```cmake
set(CMAKE_CXX_FLAGS "--gcc-toolchain=/absolute/path/to/toolchain_root ${CMAKE_CXX_FLAGS}")
```
## Benchmarks
Implementations:
- Fib
- Floorplan
- Knapsack
- NQueens
- Raycasting
# Contributing
See the [CONTRIBUTING](CONTRIBUTING.md) document.