Skip to content

prologin/camisole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f0f3daf · Dec 20, 2021
Feb 6, 2018
May 26, 2019
Dec 20, 2021
Jan 23, 2019
May 26, 2019
Aug 29, 2020
Oct 25, 2017
Oct 22, 2017
May 26, 2019
Feb 1, 2018
Oct 15, 2016
Apr 21, 2017
May 26, 2019
Feb 6, 2018
Aug 29, 2020
Sep 13, 2020
Aug 29, 2020

Repository files navigation

camisole

camisole logo

https://travis-ci.org/prologin/camisole.svg?branch=master https://coveralls.io/repos/github/prologin/camisole/badge.svg?branch=master

camisole is a secure online judge for code compilation and execution. You give some untrusted source code and a test suite, and camisole compiles the code and runs it against the test suite.

It uses isolate as a backend to safely compile and execute source codes using Linux kernel features such as namespaces, cgroups, chroot and resources limits.

Documentation

The full documentation of Camisole, including installation instructions and usage examples, is available at https://camisole.prologin.org

Features

  • Built-in support for a wide variety of languages, including Ada, C, C#, C++, Haskell, Java, JavaScript, Lua, OCaml, Pascal, Perl, PHP, Python, Ruby, Scheme…
  • Isolation: camisole runs both the compilation and execution stages in a sandboxed environment provided by isolate
  • Limitation of resources (time, wall-time, memory…)
  • Simple HTTP + JSON or MessagePack interface

Demo

camisole is used through a simple HTTP/JSON interface. Sending a program is as simple as that:

$ curl -s localhost:42920/run -d '{"lang": "python", "source": "print(42)"}' | python -m json.tool
{
    "tests": [
        {
            "stdout": "42\n",
            "stderr": "",
            "meta": {
                "status": "OK",
                "exitcode": 0,
                "wall-time": 0.067,
                "cg-mem": 2528,
                "killed": 0,
                "exitsig": 0,
                "exitsig-message": null,
                "time": 0.019,
                "max-rss": 6264,
                "csw-forced": 12,
                "csw-voluntary": 4,
                "message": null
            },
            "name": "test000",
            "exitcode": 0
        }
    ],
    "success": true
}

License

GPLv2+, see the LICENSE file.