Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.8 KB

README.md

File metadata and controls

68 lines (49 loc) · 1.8 KB

libsbox

Build Status

Libsbox is sandbox desined for evaluating submissions in programming contests.

Why libsbox?

  • 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.

Getting started

These instructions will guide you through the installation process of libsbox.

Prerequisites

  • 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

Installing

  1. Build sources
mkdir build
cd build
cmake ..
make
  1. 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

Documentation

Not ready yet

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

libsbox inspired by isolate and created to simplify writing invokers (evaluators) for various task types.