libsbox is open source C++ library introduced to be used in programming contests environments. It is simple and provide full functionality needed to evaluate participants' solutions.
These instructions will guide you through the installation process of libsbox.
- GCC or Clang compiler that can compile C++14 source
- cmake version 3.10 or higher
- linux kernel supporting following features (kernel version 5 or higher is recommended):
- cgroup filesystem, namely cpuacct and memory controllers
- oom_kill counter in memory cgroup
- namespaces, namely mount, ipc, net and pid namespaces
- cgroup hierarchy mounted in /sys/fs/cgroup
Follow the steps bellow to install libsbox on your system
- Create build directory and change to it
mkdir build
cd build
- Run Cmake to generate build files
cmake ..
- Compile sources using make
make
- Install library and associated headers
make install
To run tests type
sudo ctest --output-on-failure
or
sudo CTEST_OUTPUT_ON_FAILURE=1 make test
If memory tests fail disable swap
sudo swapoff -a
If tests don't pass check whether your system satisfies prerequisites. If you can't solve the problem yourself, open an issue in project github
Not ready yet
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Andrei Odintsov (@Forestryks)
This project is licensed under the MIT License - see the LICENSE file for details
libsbox inspired by isolate and created to simplify writing invokers (evaluators) for various task types.