{"repo": "benmeehan/gomult", "files": {"main.go": {"66c586c14054ffe245472e93bcafdcd99240c203": {"t": 1785745642.9800265, "n": 1503, "h": "3f55e9685bf48e0d", "c": "package main\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/benmeehan/gomult/internal/ai\"\n\t\"github.com/benmeehan/gomult/internal/config\"\n\t\"github.com/benmeehan/gomult/internal/sandbox\"\n\t\"github.com/benmeehan/gomult/internal/server\"\n)\n\nfunc main() {\n\tconfigPath := flag.String(\"config\", \"config.yaml\", \"path to config file\")\n\taiKey := flag.String(\"ai-key\", \"\", \"Deepseek API key for AI analysis (or set DEEPSEEK_API_KEY env var)\")\n\tflag.Parse()\n\n\tlog.SetFlags(log.LstdFlags | log.Lshortfile)\n\tlog.Print(\"gomult starting\")\n\n\tcfg, err := config.Load(*configPath)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to load config: %v\", err)\n\t}\n\n\tengine, err := sandbox.NewEngine(cfg)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create execution engine: %v\", err)\n\t}\n\n\tkey := *aiKey\n\tif key == \"\" {\n\t\tkey = os.Getenv(\"DEEPSEEK_API_KEY\")\n\t}\n\tvar aiClient *ai.Client\n\tif key != \"\" {\n\t\taiClient = ai.NewClient(key)\n\t\tlog.Print(\"AI analysis enabled (deepseek)\")\n\t}\n\n\tsrv := server.New(cfg, engine, aiClient)\n\n\tquit := make(chan os.Signal, 1)\n\tsignal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)\n\n\tgo func() {\n\t\t<-quit\n\t\tlog.Print(\"shutting down gracefully...\")\n\t\tctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\n\t\tdefer cancel()\n\t\tif err := srv.Shutdown(ctx); err != nil {\n\t\t\tlog.Printf(\"shutdown error: %v\", err)\n\t\t}\n\t}()\n\n\tlog.Printf(\"listening on :%d\", cfg.Server.Port)\n\tif err := srv.ListenAndServe(); err != nil {\n\t\tlog.Fatalf(\"server error: %v\", err)\n\t}\n}\n"}, "024623cf351712ff2035000c81775a0451bfe7aa": {"t": 1785755201.828919, "n": 1503, "h": "3f55e9685bf48e0d", "c": "package main\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/benmeehan/gomult/internal/ai\"\n\t\"github.com/benmeehan/gomult/internal/config\"\n\t\"github.com/benmeehan/gomult/internal/sandbox\"\n\t\"github.com/benmeehan/gomult/internal/server\"\n)\n\nfunc main() {\n\tconfigPath := flag.String(\"config\", \"config.yaml\", \"path to config file\")\n\taiKey := flag.String(\"ai-key\", \"\", \"Deepseek API key for AI analysis (or set DEEPSEEK_API_KEY env var)\")\n\tflag.Parse()\n\n\tlog.SetFlags(log.LstdFlags | log.Lshortfile)\n\tlog.Print(\"gomult starting\")\n\n\tcfg, err := config.Load(*configPath)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to load config: %v\", err)\n\t}\n\n\tengine, err := sandbox.NewEngine(cfg)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create execution engine: %v\", err)\n\t}\n\n\tkey := *aiKey\n\tif key == \"\" {\n\t\tkey = os.Getenv(\"DEEPSEEK_API_KEY\")\n\t}\n\tvar aiClient *ai.Client\n\tif key != \"\" {\n\t\taiClient = ai.NewClient(key)\n\t\tlog.Print(\"AI analysis enabled (deepseek)\")\n\t}\n\n\tsrv := server.New(cfg, engine, aiClient)\n\n\tquit := make(chan os.Signal, 1)\n\tsignal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)\n\n\tgo func() {\n\t\t<-quit\n\t\tlog.Print(\"shutting down gracefully...\")\n\t\tctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\n\t\tdefer cancel()\n\t\tif err := srv.Shutdown(ctx); err != nil {\n\t\t\tlog.Printf(\"shutdown error: %v\", err)\n\t\t}\n\t}()\n\n\tlog.Printf(\"listening on :%d\", cfg.Server.Port)\n\tif err := srv.ListenAndServe(); err != nil {\n\t\tlog.Fatalf(\"server error: %v\", err)\n\t}\n}\n"}, "b68a5ed18773f58b1fe9d3d47bb340dabda6d6d8": {"t": 1785755203.0503547, "n": 1150, "h": "332acbc9dd4976d5", "c": "package main\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/benmeehan/gomult/internal/config\"\n\t\"github.com/benmeehan/gomult/internal/sandbox\"\n\t\"github.com/benmeehan/gomult/internal/server\"\n)\n\nfunc main() {\n\tconfigPath := flag.String(\"config\", \"config.yaml\", \"path to config file\")\n\tflag.Parse()\n\n\tlog.SetFlags(log.LstdFlags | log.Lshortfile)\n\tlog.Print(\"gomult starting\")\n\n\tcfg, err := config.Load(*configPath)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to load config: %v\", err)\n\t}\n\n\tengine, err := sandbox.NewEngine(cfg)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create execution engine: %v\", err)\n\t}\n\n\tsrv := server.New(cfg, engine)\n\n\tquit := make(chan os.Signal, 1)\n\tsignal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)\n\n\tgo func() {\n\t\t<-quit\n\t\tlog.Print(\"shutting down gracefully...\")\n\t\tctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\n\t\tdefer cancel()\n\t\tif err := srv.Shutdown(ctx); err != nil {\n\t\t\tlog.Printf(\"shutdown error: %v\", err)\n\t\t}\n\t}()\n\n\tlog.Printf(\"listening on :%d\", cfg.Server.Port)\n\tif err := srv.ListenAndServe(); err != nil {\n\t\tlog.Fatalf(\"server error: %v\", err)\n\t}\n}\n"}}, "Readme.md": {"66c586c14054ffe245472e93bcafdcd99240c203": {"t": 1785746599.0932336, "n": 5800, "h": "8d172a63952f392e", "c": "# gomult\n\nMulti-language code compilation and execution service. Single Go binary, per-language Docker images for minimal footprint.\n\n## Languages\n\n### Base (28)\n\n| Key | Language | Key | Language | Key | Language | Key | Language |\n|-----|----------|-----|----------|-----|----------|-----|----------|\n| `py` | Python 3 | `js` | JavaScript | `rb` | Ruby | `php` | PHP |\n| `pl` | Perl | `lua` | Lua | `sh` | Bash | `ts` | TypeScript |\n| `ex` | Elixir | `pro` | Prolog | `r` | R | `rkt` | Racket |\n| `groovy` | Groovy | `kt` | Kotlin | `c` | C | `cpp` | C++ |\n| `go` | Go | `java` | Java 17 | `rs` | Rust | `cs` | C# |\n| `d` | D | `hs` | Haskell | `ml` | OCaml | `pas` | Pascal |\n| `f90` | Fortran | `erl` | Erlang | `scala` | Scala | `asm` | Assembly |\n\n### Versioned\n\n| Image | Language | Runtime |\n|-------|----------|---------|\n| `gomult-py2` | Python 2.7 | Debian bullseye |\n| `gomult-java8` | Java 8 | Adoptium |\n| `gomult-java11` | Java 11 | Adoptium |\n| `gomult-java17` | Java 17 | Adoptium |\n| `gomult-java21` | Java 21 | Adoptium |\n| `gomult-node20` | Node.js 20 | Official binary |\n| `gomult-node22` | Node.js 22 | Official binary |\n\n**35 images total.** Each contains one Go binary + one language runtime.\n\n## Quick Start\n\n### Per-language Docker (recommended)\n\n```bash\n# Build one language\ndocker build -f docker/Dockerfile.py -t gomult-py .\ndocker run -p 8080:8080 gomult-py\n\n# Build a versioned language \ndocker build -f docker/Dockerfile.java21 -t gomult-java21 .\ndocker run -p 8080:8080 gomult-java21\n```\n\n### All-in-one (28 languages, large image)\n\n```bash\ndocker build -t gomult . # uses root Dockerfile + config.yaml\ndocker run -p 8080:8080 gomult\n```\n\n### Local dev (no Docker, requires local runtimes)\n\n```bash\ngo build -o gomult .\n./gomult\n```\n\n## API\n\n`POST /compile` — JSON in, plain text out.\n\n```bash\ncurl -X POST http://localhost:8080/compile \\\n -H \"Content-Type: application/json\" \\\n -d '{\"code\":\"print(42)\",\"language\":\"py\"}'\n```\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `code` | yes | Source code |\n| `input` | no | Stdin for the program |\n| `language` | yes | Language key (see tables above) |\n| `analyze` | no | Set `true` to get AI analysis via Deepseek (requires `--ai-key` flag or `DEEPSEEK_API_KEY` env var) |\n\nSuccessful requests return program output. Errors are prefixed:\n- `[COMPILE ERROR]` — compilation failed\n- `[RUNTIME ERROR]` — non-zero exit code\n- `[TIME LIMIT EXCEEDED]` — execution timed out\n\n`GET /health` → `{\"status\":\"ok\"}` \n`GET /languages` → JSON map of supported keys\n\n## AI Analysis\n\nWhen enabled, the server can send your code and its execution output to Deepseek for analysis. The response includes bug identification, fix suggestions (on errors), or code quality feedback (on success).\n\n```bash\n# Start server with AI enabled\n./gomult --ai-key sk-your-deepseek-key\n# or\nDEEPSEEK_API_KEY=sk-... ./gomult\n```\n\n```bash\n# Request analysis\ncurl -X POST http://localhost:8080/compile \\\n -H \"Content-Type: application/json\" \\\n -d '{\"code\":\"print(1/0)\",\"language\":\"py\",\"analyze\":true}'\n```\n\nThe AI analysis appears in the response under `[AI ANALYSIS]`. If the API call fails, the error is logged server-side and `[AI ANALYSIS FAILED]` is returned — the execution result is never blocked.\n\n## Project Structure\n\n```\ngomult/\n├── main.go # Entry point\n├── go.mod / go.sum\n├── config.yaml # All-in-one config (28 langs)\n├── Dockerfile # All-in-one Dockerfile\n├── internal/\n│ ├── config/config.go # YAML config loading\n│ ├── sandbox/ # Execution engine\n│ │ ├── sandbox.go # Types + Executor interface\n│ │ ├── engine.go # Compile → run orchestration\n│ │ ├── executor_direct.go # Direct execution (dev/fallback)\n│ │ └── executor_nsjail.go # nsjail sandbox (production)\n│ ├── ai/ai.go # Deepseek analysis client\n│ └── server/server.go # HTTP handlers\n├── configs/ # Per-language configs\n│ ├── py.yaml, c.yaml, java.yaml ...\n│ └── py2.yaml, java8.yaml ... # Version-specific\n└── docker/ # Per-language Dockerfiles\n ├── Dockerfile.py, Dockerfile.c ...\n └── Dockerfile.java21, Dockerfile.node22 ...\n```\n\n## Configuration\n\n### CLI flags\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--config` | `config.yaml` | Path to config file |\n| `--ai-key` | (env `DEEPSEEK_API_KEY`) | Deepseek API key for AI analysis |\n\nPer-language configs follow the same format. Key settings:\n\n```yaml\nserver:\n port: 8080\n max_code_size: 1048576 # 1 MB\nsandbox:\n mode: direct # direct | nsjail | auto\n time_limit: 5 # seconds\n max_memory: 268435456 # 256 MB\n max_file_size: 10485760 # 10 MB\n max_processes: 32\nlanguages:\n py:\n name: Python 3\n extension: .py\n run_cmd: [python3, \"{file}\"] # omit compile_cmd for interpreted\n```\n\n### Adding a language\n\n1. Create `configs/zig.yaml` with a language block\n2. Create `docker/Dockerfile.zig` installing the runtime + copying the config\n\n```dockerfile\nFROM debian:bookworm-slim\nRUN apt-get update && apt-get install -y zig\nCOPY --from=builder /app/gomult /usr/local/bin/gomult\nCOPY configs/zig.yaml /etc/gomult/config.yaml\n...\n```\n\nPlaceholders in commands: `{file}` (source path), `{output}` (binary path), `{dir}` (work directory).\n\n## Sandbox\n\nSet `sandbox.mode: nsjail` in config for production. Requires nsjail installed in the image. Adds network isolation, cgroup memory limits, and seccomp filtering. Falls back to `direct` mode when nsjail is unavailable.\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE)\n"}, "024623cf351712ff2035000c81775a0451bfe7aa": {"t": 1785755199.8988, "n": 5800, "h": "8d172a63952f392e", "c": "# gomult\n\nMulti-language code compilation and execution service. Single Go binary, per-language Docker images for minimal footprint.\n\n## Languages\n\n### Base (28)\n\n| Key | Language | Key | Language | Key | Language | Key | Language |\n|-----|----------|-----|----------|-----|----------|-----|----------|\n| `py` | Python 3 | `js` | JavaScript | `rb` | Ruby | `php` | PHP |\n| `pl` | Perl | `lua` | Lua | `sh` | Bash | `ts` | TypeScript |\n| `ex` | Elixir | `pro` | Prolog | `r` | R | `rkt` | Racket |\n| `groovy` | Groovy | `kt` | Kotlin | `c` | C | `cpp` | C++ |\n| `go` | Go | `java` | Java 17 | `rs` | Rust | `cs` | C# |\n| `d` | D | `hs` | Haskell | `ml` | OCaml | `pas` | Pascal |\n| `f90` | Fortran | `erl` | Erlang | `scala` | Scala | `asm` | Assembly |\n\n### Versioned\n\n| Image | Language | Runtime |\n|-------|----------|---------|\n| `gomult-py2` | Python 2.7 | Debian bullseye |\n| `gomult-java8` | Java 8 | Adoptium |\n| `gomult-java11` | Java 11 | Adoptium |\n| `gomult-java17` | Java 17 | Adoptium |\n| `gomult-java21` | Java 21 | Adoptium |\n| `gomult-node20` | Node.js 20 | Official binary |\n| `gomult-node22` | Node.js 22 | Official binary |\n\n**35 images total.** Each contains one Go binary + one language runtime.\n\n## Quick Start\n\n### Per-language Docker (recommended)\n\n```bash\n# Build one language\ndocker build -f docker/Dockerfile.py -t gomult-py .\ndocker run -p 8080:8080 gomult-py\n\n# Build a versioned language \ndocker build -f docker/Dockerfile.java21 -t gomult-java21 .\ndocker run -p 8080:8080 gomult-java21\n```\n\n### All-in-one (28 languages, large image)\n\n```bash\ndocker build -t gomult . # uses root Dockerfile + config.yaml\ndocker run -p 8080:8080 gomult\n```\n\n### Local dev (no Docker, requires local runtimes)\n\n```bash\ngo build -o gomult .\n./gomult\n```\n\n## API\n\n`POST /compile` — JSON in, plain text out.\n\n```bash\ncurl -X POST http://localhost:8080/compile \\\n -H \"Content-Type: application/json\" \\\n -d '{\"code\":\"print(42)\",\"language\":\"py\"}'\n```\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `code` | yes | Source code |\n| `input` | no | Stdin for the program |\n| `language` | yes | Language key (see tables above) |\n| `analyze` | no | Set `true` to get AI analysis via Deepseek (requires `--ai-key` flag or `DEEPSEEK_API_KEY` env var) |\n\nSuccessful requests return program output. Errors are prefixed:\n- `[COMPILE ERROR]` — compilation failed\n- `[RUNTIME ERROR]` — non-zero exit code\n- `[TIME LIMIT EXCEEDED]` — execution timed out\n\n`GET /health` → `{\"status\":\"ok\"}` \n`GET /languages` → JSON map of supported keys\n\n## AI Analysis\n\nWhen enabled, the server can send your code and its execution output to Deepseek for analysis. The response includes bug identification, fix suggestions (on errors), or code quality feedback (on success).\n\n```bash\n# Start server with AI enabled\n./gomult --ai-key sk-your-deepseek-key\n# or\nDEEPSEEK_API_KEY=sk-... ./gomult\n```\n\n```bash\n# Request analysis\ncurl -X POST http://localhost:8080/compile \\\n -H \"Content-Type: application/json\" \\\n -d '{\"code\":\"print(1/0)\",\"language\":\"py\",\"analyze\":true}'\n```\n\nThe AI analysis appears in the response under `[AI ANALYSIS]`. If the API call fails, the error is logged server-side and `[AI ANALYSIS FAILED]` is returned — the execution result is never blocked.\n\n## Project Structure\n\n```\ngomult/\n├── main.go # Entry point\n├── go.mod / go.sum\n├── config.yaml # All-in-one config (28 langs)\n├── Dockerfile # All-in-one Dockerfile\n├── internal/\n│ ├── config/config.go # YAML config loading\n│ ├── sandbox/ # Execution engine\n│ │ ├── sandbox.go # Types + Executor interface\n│ │ ├── engine.go # Compile → run orchestration\n│ │ ├── executor_direct.go # Direct execution (dev/fallback)\n│ │ └── executor_nsjail.go # nsjail sandbox (production)\n│ ├── ai/ai.go # Deepseek analysis client\n│ └── server/server.go # HTTP handlers\n├── configs/ # Per-language configs\n│ ├── py.yaml, c.yaml, java.yaml ...\n│ └── py2.yaml, java8.yaml ... # Version-specific\n└── docker/ # Per-language Dockerfiles\n ├── Dockerfile.py, Dockerfile.c ...\n └── Dockerfile.java21, Dockerfile.node22 ...\n```\n\n## Configuration\n\n### CLI flags\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--config` | `config.yaml` | Path to config file |\n| `--ai-key` | (env `DEEPSEEK_API_KEY`) | Deepseek API key for AI analysis |\n\nPer-language configs follow the same format. Key settings:\n\n```yaml\nserver:\n port: 8080\n max_code_size: 1048576 # 1 MB\nsandbox:\n mode: direct # direct | nsjail | auto\n time_limit: 5 # seconds\n max_memory: 268435456 # 256 MB\n max_file_size: 10485760 # 10 MB\n max_processes: 32\nlanguages:\n py:\n name: Python 3\n extension: .py\n run_cmd: [python3, \"{file}\"] # omit compile_cmd for interpreted\n```\n\n### Adding a language\n\n1. Create `configs/zig.yaml` with a language block\n2. Create `docker/Dockerfile.zig` installing the runtime + copying the config\n\n```dockerfile\nFROM debian:bookworm-slim\nRUN apt-get update && apt-get install -y zig\nCOPY --from=builder /app/gomult /usr/local/bin/gomult\nCOPY configs/zig.yaml /etc/gomult/config.yaml\n...\n```\n\nPlaceholders in commands: `{file}` (source path), `{output}` (binary path), `{dir}` (work directory).\n\n## Sandbox\n\nSet `sandbox.mode: nsjail` in config for production. Requires nsjail installed in the image. Adds network isolation, cgroup memory limits, and seccomp filtering. Falls back to `direct` mode when nsjail is unavailable.\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE)\n"}, "17c287fdefdf0e94b8595b57c85ec62992373b2c": {"t": 1785755201.2621787, "n": 4680, "h": "c1403ed995bad355", "c": "# gomult\n\nMulti-language code compilation and execution service. Single Go binary, per-language Docker images for minimal footprint.\n\n## Languages\n\n### Base (28)\n\n| Key | Language | Key | Language | Key | Language | Key | Language |\n|-----|----------|-----|----------|-----|----------|-----|----------|\n| `py` | Python 3 | `js` | JavaScript | `rb` | Ruby | `php` | PHP |\n| `pl` | Perl | `lua` | Lua | `sh` | Bash | `ts` | TypeScript |\n| `ex` | Elixir | `pro` | Prolog | `r` | R | `rkt` | Racket |\n| `groovy` | Groovy | `kt` | Kotlin | `c` | C | `cpp` | C++ |\n| `go` | Go | `java` | Java 17 | `rs` | Rust | `cs` | C# |\n| `d` | D | `hs` | Haskell | `ml` | OCaml | `pas` | Pascal |\n| `f90` | Fortran | `erl` | Erlang | `scala` | Scala | `asm` | Assembly |\n\n### Versioned\n\n| Image | Language | Runtime |\n|-------|----------|---------|\n| `gomult-py2` | Python 2.7 | Debian bullseye |\n| `gomult-java8` | Java 8 | Adoptium |\n| `gomult-java11` | Java 11 | Adoptium |\n| `gomult-java17` | Java 17 | Adoptium |\n| `gomult-java21` | Java 21 | Adoptium |\n| `gomult-node20` | Node.js 20 | Official binary |\n| `gomult-node22` | Node.js 22 | Official binary |\n\n**35 images total.** Each contains one Go binary + one language runtime.\n\n## Quick Start\n\n### Per-language Docker (recommended)\n\n```bash\n# Build one language\ndocker build -f docker/Dockerfile.py -t gomult-py .\ndocker run -p 8080:8080 gomult-py\n\n# Build a versioned language \ndocker build -f docker/Dockerfile.java21 -t gomult-java21 .\ndocker run -p 8080:8080 gomult-java21\n```\n\n### All-in-one (28 languages, large image)\n\n```bash\ndocker build -t gomult . # uses root Dockerfile + config.yaml\ndocker run -p 8080:8080 gomult\n```\n\n### Local dev (no Docker, requires local runtimes)\n\n```bash\ngo build -o gomult .\n./gomult\n```\n\n## API\n\n`POST /compile` — JSON in, plain text out.\n\n```bash\ncurl -X POST http://localhost:8080/compile \\\n -H \"Content-Type: application/json\" \\\n -d '{\"code\":\"print(42)\",\"language\":\"py\"}'\n```\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `code` | yes | Source code |\n| `input` | no | Stdin for the program |\n| `language` | yes | Language key (see tables above) |\n\nSuccessful requests return program output. Errors are prefixed:\n- `[COMPILE ERROR]` — compilation failed\n- `[RUNTIME ERROR]` — non-zero exit code\n- `[TIME LIMIT EXCEEDED]` — execution timed out\n\n`GET /health` → `{\"status\":\"ok\"}` \n`GET /languages` → JSON map of supported keys\n\n## Project Structure\n\n```\ngomult/\n├── main.go # Entry point\n├── go.mod / go.sum\n├── config.yaml # All-in-one config (28 langs)\n├── Dockerfile # All-in-one Dockerfile\n├── internal/\n│ ├── config/config.go # YAML config loading\n│ ├── sandbox/ # Execution engine\n│ │ ├── sandbox.go # Types + Executor interface\n│ │ ├── engine.go # Compile → run orchestration\n│ │ ├── executor_direct.go # Direct execution (dev/fallback)\n│ │ └── executor_nsjail.go # nsjail sandbox (production)\n│ └── server/server.go # HTTP handlers\n├── configs/ # Per-language configs\n│ ├── py.yaml, c.yaml, java.yaml ...\n│ └── py2.yaml, java8.yaml ... # Version-specific\n└── docker/ # Per-language Dockerfiles\n ├── Dockerfile.py, Dockerfile.c ...\n └── Dockerfile.java21, Dockerfile.node22 ...\n```\n\n## Configuration\n\nPer-language configs follow the same format. Key settings:\n\n```yaml\nserver:\n port: 8080\n max_code_size: 1048576 # 1 MB\nsandbox:\n mode: direct # direct | nsjail | auto\n time_limit: 5 # seconds\n max_memory: 268435456 # 256 MB\n max_file_size: 10485760 # 10 MB\n max_processes: 32\nlanguages:\n py:\n name: Python 3\n extension: .py\n run_cmd: [python3, \"{file}\"] # omit compile_cmd for interpreted\n```\n\n### Adding a language\n\n1. Create `configs/zig.yaml` with a language block\n2. Create `docker/Dockerfile.zig` installing the runtime + copying the config\n\n```dockerfile\nFROM debian:bookworm-slim\nRUN apt-get update && apt-get install -y zig\nCOPY --from=builder /app/gomult /usr/local/bin/gomult\nCOPY configs/zig.yaml /etc/gomult/config.yaml\n...\n```\n\nPlaceholders in commands: `{file}` (source path), `{output}` (binary path), `{dir}` (work directory).\n\n## Sandbox\n\nSet `sandbox.mode: nsjail` in config for production. Requires nsjail installed in the image. Adds network isolation, cgroup memory limits, and seccomp filtering. Falls back to `direct` mode when nsjail is unavailable.\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE)\n"}, "b68a5ed18773f58b1fe9d3d47bb340dabda6d6d8": {"t": 1785755202.3995295, "n": 3205, "h": "a3dc0f80d20aa952", "c": "# gomult\n\nMulti-language code compilation and execution service with nsjail sandboxing.\n\n## Supported Languages (28)\n\n| Key | Language | Type |\n|-----|----------|------|\n| `asm` | Assembly (NASM x86-64) | Compiled |\n| `c` | C | Compiled |\n| `cpp` | C++ | Compiled |\n| `cs` | C# (Mono) | Compiled |\n| `d` | D | Compiled |\n| `erl` | Erlang | Compiled |\n| `ex` | Elixir | Interpreted |\n| `f90` | Fortran | Compiled |\n| `go` | Go | Compiled |\n| `groovy` | Groovy | Interpreted |\n| `hs` | Haskell | Compiled |\n| `java` | Java | Compiled |\n| `js` | JavaScript | Interpreted |\n| `kt` | Kotlin | Interpreted |\n| `lua` | Lua | Interpreted |\n| `ml` | OCaml | Compiled |\n| `pas` | Pascal | Compiled |\n| `php` | PHP | Interpreted |\n| `pl` | Perl | Interpreted |\n| `pro` | Prolog | Interpreted |\n| `py` | Python 3 | Interpreted |\n| `r` | R | Interpreted |\n| `rb` | Ruby | Interpreted |\n| `rkt` | Racket | Interpreted |\n| `rs` | Rust | Compiled |\n| `scala` | Scala | Compiled |\n| `sh` | Bash | Interpreted |\n| `ts` | TypeScript | Interpreted |\n\n## Features\n\n- Single binary, config-driven — add a language with one YAML block\n- nsjail sandbox: network isolation, rlimits (memory, filesize, nproc), user separation\n- Fallback to direct execution when nsjail is unavailable\n- Health check and language listing endpoints\n\n## Quick Start\n\n```bash\ngo build -o gomult .\n./gomult\n```\n\nStarts on `http://localhost:8080` in `direct` sandbox mode (no nsjail needed for local dev).\n\n### Docker\n\n```bash\ndocker build -t gomult .\ndocker run -p 8080:8080 gomult\n```\n\nThe Docker image includes nsjail and all 28 language runtimes.\n\n## API\n\n### `POST /compile`\n\n```bash\ncurl -X POST http://localhost:8080/compile \\\n -H \"Content-Type: application/json\" \\\n -d '{\"code\":\"print(\\\"hello\\\")\",\"input\":\"\",\"language\":\"py\"}'\n```\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `code` | string | yes | Source code |\n| `input` | string | no | Stdin input |\n| `language` | string | yes | Language key (see table) |\n\nResponse is `text/plain`. Errors are prefixed: `[COMPILE ERROR]`, `[RUNTIME ERROR]`, `[TIME LIMIT EXCEEDED]`.\n\n### `GET /health` — `{\"status\":\"ok\"}`\n\n### `GET /languages` — JSON map of language keys to names\n\n## Configuration\n\nSee `config.yaml`. Key settings:\n\n| Setting | Default | Description |\n|---|---|---|\n| `server.port` | 8080 | Listen port |\n| `server.max_code_size` | 1048576 | Max code length (1 MB) |\n| `sandbox.mode` | `auto` | `nsjail`, `direct`, or `auto` |\n| `sandbox.time_limit` | 5 | Timeout (seconds) |\n| `sandbox.max_memory` | 268435456 | Memory limit (256 MB) |\n| `sandbox.max_file_size` | 10485760 | Max file size (10 MB) |\n| `sandbox.max_processes` | 32 | Max processes per run |\n| `sandbox.runtime_user` | 1000 | UID for sandboxed processes |\n\n### Adding a language\n\n```yaml\nlanguages:\n zig:\n name: Zig\n extension: .zig\n compile_cmd: [zig, build-exe, \"{file}\"]\n run_cmd: [\"{output}\"]\n```\n\nPlaceholders: `{file}` (source path), `{output}` (binary path), `{dir}` (work directory). Omit `compile_cmd` for interpreted languages. Set `source_file` to override the written filename (defaults to `code.`).\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE)\n"}, "ef38fa2077728bbd6d718b30ebad10f237ffa6bf": {"t": 1785755203.7013173, "n": 2969, "h": "7613a16b50eaec41", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\nFor demo API's please look at [API Readme](./Api.md)\n\nThank you [Render](https://render.com/) for your free services.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n**Make a post request to this URL(https://load-balancer-1l8h.onrender.com) to test it out.**\n\n*Example curl request*\n\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{\n \"code\": \"print(\\\"Hello, World!\\\")\",\n \"input\": \"\",\n \"language\": \"py\"\n}' https://load-balancer-1l8h.onrender.com/compile\n```\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- Python 3\n- Python 2.7\n- Java 11\n- Javascript\n- Golang\n- Rust\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@gmail.com\n\n"}, "b4d20981b95de3a2f1c984f8bf37cf5b0cdb75e0": {"t": 1785755205.8780894, "n": 2971, "h": "5aab9c6e66e7417e", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\nFor demo API's please look at [API Readme](./Api.md)\n\nThank you [Render](https://render.com/) for your free services.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n**Make a post request to this URL(https://load-balancer-1l8h.onrender.com) to test it out.**\n\n*Example curl request*\n\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{\n \"code\": \"print(\\\"Hello, World!\\\")\",\n \"input\": \"\",\n \"language\": \"py\"\n}' https://load-balancer-1l8h.onrender.com/compile\n```\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- Python 3\n- Python 2.7\n- Java 11\n- Javascript\n- Golang\n- Rust\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@example.com.\n"}, "fcb9116b29f8834aee21314ac4009ecb0894907c": {"t": 1785755208.4182556, "n": 2958, "h": "d6f50613793e4918", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\nFor demo API's please look at [API Readme](./Api.md)\n\nThank you [Render](https://render.com/) for your free services.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n**Make a post request to this URL(https://load-balancer-1l8h.onrender.com) to test it out.**\n\n*Example curl request*\n\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{\n \"code\": \"print(\\\"Hello, World!\\\")\",\n \"input\": \"\",\n \"language\": \"py\"\n}' https://load-balancer-1l8h.onrender.com/compile\n```\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- Python 3\n- Python 2.7\n- Java 11\n- Golang\n- Rust\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@example.com.\n"}, "03996458428cf3e1db002c53951098965f3f98f4": {"t": 1785755209.8017373, "n": 2942, "h": "ad069d2926afaaaf", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\nFor demo API's please look at [API Readme](./Api.md)\n\nThank you [Render](https://render.com/) for your free services.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n**Make a post request to this URL(https://load-balancer-1l8h.onrender.com) to test it out.**\n\n*Example curl request*\n\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{\n \"code\": \"print(\\\"Hello, World!\\\")\",\n \"input\": \"\",\n \"language\": \"py\"\n}' https://load-balancer-1l8h.onrender.com/compile\n```\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- Python 3\n- Python 2.7\n- Java 11\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@example.com.\n"}, "dc16ebec2a09026c01177877a6db8f6832660765": {"t": 1785755211.5131838, "n": 2637, "h": "68809ccb6f44a859", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\nFor demo API's please look at [API Readme](./Api.md)\n\nThank you [Render](https://render.com/) for your free services.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- Python 3\n- Python 2.7\n- Java 11\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@example.com.\n"}, "a8b6fe24ebfd5de41dfabb44dd03891662f52da2": {"t": 1785755213.9739888, "n": 2518, "h": "96b177d6c6cbc2ff", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- Python 3\n- Python 2.7\n- Java 11\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@example.com.\n"}, "e3bfbd454f1f14bd9cc8d0629f299996204469bc": {"t": 1785755215.344865, "n": 2507, "h": "a24f1e8d688cf320", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- Python 3\n- Python 2.7\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@example.com."}, "7d364783e28edd422c3a4d790dabe217d3a13498": {"t": 1785755216.7319055, "n": 2483, "h": "dd88f3d8d9580ec4", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\n## Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n## Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```\n\n- **code:** The code snippet to be compiled and executed.\n- **input:** The input to be provided to the program (optional, depending on the language).\n- **language:** The programming language of the code snippet.\n\n\n### Response Format:\n\nIf the compilation and execution are successful within the timeout duration, the API will respond with the output of the program.\n\nIf an error occurs during compilation or execution, the API will respond with an appropriate error message.\n\n## Supported Languages\n\nThe service currently supports the following programming languages:\n\n- C\n- C++\n- more to be added soon...\n\nYou can extend the service to support additional languages by adding the corresponding code compilation and execution logic.\n\n## Contributing\n\nContributions are welcome! If you would like to contribute to this project, please follow these steps:\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your modifications.\n- Commit your changes and push the branch to your forked repository.\n- Submit a pull request detailing your changes.\n\n## License\nThis project is licensed under the [Apache License](./LICENSE)\n\n## Contact \nFor any inquiries or support, please contact benmeehan111@example.com."}, "07dc4b4df92aede83b2ef09a26e26851866ff64d": {"t": 1785755218.2025151, "n": 1255, "h": "cbf09ad8eef7cd51", "c": "# Code Compilation and Execution Service\n\nThis project provides a compilation and execution service for multiple programming languages. It allows you to submit code snippets in various languages and receive the corresponding output.\n\n### Features\n\n- Supports multiple programming languages\n- Secure execution environment with restricted user privileges\n- Handles code compilation and execution\n- Timeout mechanism to prevent long-running executions\n\n\n### Prerequisites\n- Docker: Make sure you have Docker installed on your machine to run the code execution service.\n\n### Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-username/your-repo.git\n```\n\n2. Navigate to the project directory:\n```bash\ncd your-repo\n```\n\n3. Build the Docker image:\n```bash\ndocker build -t code-execution-service .\n```\n4. Run the Docker container:\n```bash\ndocker run -p 8080:8080 code-execution-service\n```\n\n5. The code execution service is now running. You can access it at `http://localhost:8080`.\n\n\n## API Usage\n### Endpoint: /compile\n\nSend a POST request to this endpoint to compile and execute code.\n\n#### Request Format:\n```json\n{\n \"code\": \"\",\n \"input\": \"\",\n \"language\": \"\"\n}\n```"}}}}