Skip to content

AandALabs/CodeRunr

Repository files navigation

CodeRunr

Python Version from PEP 621 TOML

A code execution sandbox that compiles and runs user-submitted code in secure, isolated environments using Isolate.

We use isolate (A sandbox for securely executing untrusted programs) to execute program in isolated environment using linux feature such as CgroupV2, namespace. The current version of the isolate uses linux cgroupV2, and it highly recommended to use cgroupV2.

Supported Languages

Currently we are only supporting these languages, we will add more in future.

C, C++, Python, JavaScript, TypeScript, Java, Go, Rust

Getting Started

Prerequisites

  • Docker & Docker Compose

Run

docker compose up -d --build

The API will be available at http://localhost:8080.

Authentication

All API endpoints except docs, OpenAPI, and health require an API token.

Set AUTH_TOKEN in your .env file and send it on each protected request using either:

X-API-Key: <your-auth-token>

API Endpoints

Method Endpoint Description
GET /api/v1/health Health check
POST /api/v1/submissions Create a submission
GET /api/v1/submissions/{id} Get submission result
GET /api/v1/languages List supported languages
POST /api/v1/languages Add a language

About

CodeRunr: Code compilation and sandboxes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors