Libsbox is sandbox desined for evaluating submissions in programming contests.
- Performance. Libsbox need only around 2ms to start sandbox, which is close to simple exec()
- Ease of use. You can include
libsbox.h
to easily run anything in sandbox.
These instructions will guide you through the installation process of libsbox.
- C++17 compiler, especially
std::filesystem
support - CMake version 3.10 or higher
- linux kernel version 5 or higher (may also work with late 4.* versions)
- cgroup v1 heirarchy mounted in /sys/fs/cgroup
- Build sources
mkdir build
cd build
cmake ..
make
- Install libsbox
sudo make install
Following will be installed:
/usr/include/libsbox.h
- libsbox C++ header/usr/lib/libsbox.a
- static library/usr/lib/libsbox.so
- dynamic library/usr/bin/libsboxd
- libsbox daemon binary/etc/libsbox/conf.json
- libsbox configuration file- invokers group created
[comment]: # (3. To allow users use libsbox add them to invokers
group TODO
sudo usermod -aG invokers username
```)
3. Run tests
```bash
sudo make bundled_tests
If you started libsboxd yourself and want to validate that everything is good run sudo make tests
Not ready yet
- 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.