Skip to content

Supported Languages

Programming languages in the judge image and how to add or customize language support.

Languages are defined in src/judge/languages.toml and registered in Postgres via /v1/languages. On startup the judge maps database IDs to local configs by name. A mismatch between the database and config file causes compile failures for all submissions in that language.

LanguageVersionExtNotes
C++13.2.0.cppg++ -O2
C13.2.0.cgcc -O2
Python3.12.pyinterpreted
PyPy3.9.18.pysame ext as Python, different ID
Java21.0.3.java512 MB heap, renames file if class ≠ filename
JavaScript21.6.2.jsNode
TypeScript5.4.5.tstsc → Node
Go1.24.11.gomodule cache mounts, 2 cores at compile
Rust1.78.0.rsrustc
Ruby3.2.3.rb
Lua5.4.6.lua
Kotlin1.9.24.ktJVM, InputKt.class entry
Haskell9.4.7.hsGHC

Time and memory limits come from the problem, not this table. Defaults are usually 5 to 10s CPU and 256 to 512 MB unless overridden on create.

All languages run through nsjail. See Judge service for sandbox and grading details.

Each block needs name, version, extension and script. The script runs at compile time and must produce /executable/main. {IN_FILE} is the source path placeholder.

  1. Install toolchain in Dockerfile.newbase
  2. Write build script and test it in isolation if possible
  3. Rebuild judge image
  4. POST /v1/languages
  5. Submit a known AC solution. If step 5 fails, verify the build script before debugging the solution logic.

Java: public class name must match filename, or the judge renames the file automatically.

Go: first submission after cold start is slow due to module download. Warm the cache or warn contestants.

TypeScript / Kotlin: compile errors appear as COMPILE_TIME_ERROR. Read stderr.

Python vs PyPy: same .py extension, different language IDs. Select the intended runtime explicitly.

Output comparison: line-by-line with trimmed whitespace. "42\n" and "42" can differ if output omits the trailing newline.