Skip to main content

Language Support Overview

Supported Languages

Runner Codes supports 45 programming languages across multiple categories, each with its own optimized rootfs image.

Main Languages

LanguageVersionRootfsBoot Time
Python3.10600 MB~3.1s
Node.js20 LTS700 MB~3.2s
TypeScript5.x800 MB~3.5s
Go1.22700 MB~3.5s
Ruststable2 GB~5-8s

Systems Languages

LanguageVersionRootfsBoot Time
CGCC 11500 MB~3s
C++G++ 11600 MB~3.5s
Zig0.11600 MB~4s
DLDC 1.28800 MB~4s

JVM Languages

LanguageVersionRootfsBoot Time
Java17900 MB~4s
Kotlin1.91 GB~4.5s
Scala3.x1.2 GB~5s
Groovy4.x1 GB~4.5s
Clojure1.111 GB~5s

Scripting Languages

LanguageVersionRootfsBoot Time
Ruby3.0600 MB~3s
PHP8.1600 MB~3s
Perl5.34500 MB~3s
Lua5.4400 MB~2.8s
Tcl8.6400 MB~2.8s
Bash5.1512 MB~3s
AWKGNU400 MB~2.5s

Functional Languages

LanguageVersionRootfsBoot Time
HaskellGHC 91.5 GB~6s
OCaml4.13700 MB~4s
F#.NET 81.5 GB~5s
Elixir1.12800 MB~4s
ErlangOTP 24700 MB~4s
SchemeGuile500 MB~3s
Common LispSBCL600 MB~3.5s

Modern Compiled Languages

LanguageVersionRootfsBoot Time
Crystal1.x800 MB~4s
Nim2.0600 MB~4s
Swift5.x1.5 GB~5s
V0.4500 MB~3.5s

Scientific Computing

LanguageVersionRootfsBoot Time
Julia1.101.5 GB~8s
R4.11 GB~5s
Octave6.11.2 GB~6s
FortranGFortran500 MB~3.5s

Database & Query Languages

LanguageVersionRootfsBoot Time
SQLite3.x400 MB~2.5s
jq1.6400 MB~2.5s

Legacy Languages

LanguageVersionRootfsBoot Time
COBOLGnuCOBOL600 MB~4s
PascalFreePascal500 MB~3.5s
PrologSWI-Prolog600 MB~3.5s
NASMx86 Assembly400 MB~3s

Language Comparison

Performance Tiers

TierLanguagesBoot + ExecuteUse Cases
Fast (~2-3s)Python, Node.js, Bash, Ruby, PHP, Perl, Lua, Tcl, AWK, SQLite, jq~2.5-3.2sScripting, rapid prototyping
Medium (~3-5s)Go, Java, Kotlin, Scala, Groovy, Clojure, Elixir, Erlang~3.5-5sEnterprise, concurrent apps
Compiled (~4-8s)C, C++, Rust, D, Zig, Crystal, Nim, Haskell, OCaml, F#, Swift~4-8sPerformance-critical code
Heavy (~5-10s)Julia, R, Octave, .NET (C#, F#), COBOL~5-10sScientific computing, legacy

Detailed Comparison

LanguageTypeRootfs SizeBoot + ExecuteBest For
PythonInterpreted600 MB~3.1sData science, scripting
Node.jsInterpreted700 MB~3.2sWeb, async operations
TypeScriptTranspiled800 MB~3.5sType-safe JavaScript
GoCompiled700 MB~3.5sSystems, concurrency
RustCompiled2 GB~5-8sPerformance, safety
JavaJVM900 MB~4sEnterprise applications
KotlinJVM1 GB~4.5sModern JVM development
CCompiled500 MB~3sSystems programming
C++Compiled600 MB~3.5sHigh-performance apps
RubyInterpreted600 MB~3sScripting, web
PHPInterpreted600 MB~3sWeb scripting
BashInterpreted512 MB~3.0sShell scripting
HaskellCompiled1.5 GB~6sFunctional programming
ElixirBEAM800 MB~4sConcurrent systems
JuliaJIT1.5 GB~8sScientific computing
SQLiteQuery400 MB~2.5sDatabase operations
COBOLCompiled600 MB~4sBusiness logic
note

Times include VM boot (~3s) + code execution. Actual code execution times vary based on complexity.

Execution Models

Interpreted Languages

Python, Node.js, Ruby, PHP, Perl, Lua, Tcl, Bash, R are executed directly by their interpreters:

Interpreted Languages Execution Flow

Compiled Languages

C, C++, Go, Rust, D, Zig, Haskell, Crystal, Nim, COBOL require compilation:

Compiled Languages Execution Flow

JVM Languages

Java, Kotlin, Scala, Groovy, Clojure use the JVM:

JVM Languages Execution Flow

BEAM Languages

Elixir and Erlang run on the BEAM virtual machine:

BEAM Languages Execution Flow

Language Configuration

Each language is configured in pkg/guest/executor.go:

Type definition
type LanguageConfig struct {
Name string // Language identifier ("python", "node", etc.)
Extension string // File extension (".py", ".js", etc.)
Command string // Interpreter/compiler command
Args []string // Additional arguments
NeedsBuild bool // Whether compilation is required
BuildCmd string // Compiler command (if compiled)
BuildArgs []string // Compiler arguments
}

// Example configurations
languages := map[string]LanguageConfig{
"python": {
Name: "python",
Extension: ".py",
Command: "python3",
},
"rust": {
Name: "rust",
Extension: ".rs",
NeedsBuild: true,
BuildCmd: "rustc",
BuildArgs: []string{"-o", "runbin"},
},
"kotlin": {
Name: "kotlin",
Extension: ".kt",
NeedsBuild: true,
BuildCmd: "kotlinc",
BuildArgs: []string{"-include-runtime", "-d", "Main.jar"},
Command: "java",
Args: []string{"-jar", "Main.jar"},
},
// ... 42+ more languages
}

Environment Variables

The executor sets these environment variables for all languages:

Go code
cmd.Env = append(os.Environ(),
"HOME=/tmp",
"TMPDIR=/tmp",
// Go
"GOCACHE=/tmp/go-cache",
"GOPATH=/tmp/go",
"GOROOT=/usr/local/go",
// Rust
"CARGO_HOME=/opt/cargo",
"RUSTUP_HOME=/opt/rustup",
// JVM
"JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64",
// .NET
"DOTNET_ROOT=/usr/share/dotnet",
// Julia
"JULIA_DEPOT_PATH=/tmp/julia",
// PATH
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:...",
)

Choosing the Right Language

**Python, Node.js, Ruby, PHP, Perl, Lua**

- Fast startup times (~3s)
- Rich standard libraries
- Great for quick tasks
- Easy to read and maintain



**Rust, C, C++, Go, Zig**

- Compiled to native code
- Zero-cost abstractions
- Memory safety (Rust, Go)
- Best for compute-intensive tasks



**Java, Kotlin, Scala, C#, F#**

- Strong typing
- Rich ecosystems
- Good for complex business logic
- Cross-platform support



**Haskell, Elixir, Erlang, OCaml, Clojure, Scheme**

- Immutable data structures
- Pattern matching
- Concurrent programming
- Mathematical elegance



**Julia, R, Octave, Python, Fortran**

- Numerical computing
- Statistical analysis
- Linear algebra
- Data visualization



**SQLite, jq, AWK, Python**

- Query languages
- Text processing
- JSON manipulation
- Data transformation



**COBOL, Fortran, Pascal**

- Business applications
- Scientific computing
- Educational purposes
- Migration projects

Performance Benchmarks

Fibonacci(30) Benchmark

LanguageExecution TimeNotes
C~0.003sDirect compilation
Rust~0.005sZero-cost abstractions
Go~0.01sCompiled, optimized
Java~0.02sJIT optimization
Node.js~0.1sV8 JIT optimization
Python~0.3sRecursive implementation
Ruby~0.5sInterpreted
Bash~8sRecursive, very slow
note

Times exclude VM boot. Includes compilation time for compiled languages.

Hello World (Total Time Including Boot)

LanguageTotal TimeCompileExecute
Bash3010ms-10ms
Python3050ms-50ms
SQLite3020ms-20ms
Node.js3100ms-100ms
Go3500ms450ms50ms
Java4000ms800ms200ms
Rust5000ms1900ms100ms
Haskell6000ms2800ms200ms

Adding Custom Languages

To add support for a new language:

1. Create rootfs:

Create new rootfs with language runtime
task aws:create-rootfs-{lang}

2. Add configuration:

Add language configuration to pkg/guest/executor.go:

Language configuration
"newlang": {
Name: "newlang",
Extension: ".nlg",
Command: "newlang",
Args: []string{"run"},
NeedsBuild: false,
},

3. Build and deploy:

Build infra.operator for Linux
task build:infra-operator-linux
Deploy to AWS
task aws:deploy

4. Test:

Test new language
task aws:test LANG=newlang CODE="print('hello')"

Limitations

Common Limitations

  • No network access: VMs don't have network connectivity
  • No persistent storage: Files are lost after execution
  • Memory limit: 512 MiB by default
  • Timeout: Configurable, default 10 seconds

Language-Specific Limitations

LanguageLimitations
PythonNo external packages (unless in rootfs)
Node.jsNo npm install during execution
Gogo mod not supported inline
RustNo cargo, only rustc
JavaNo external JARs
KotlinNo Gradle/Maven
HaskellNo cabal packages
JuliaNo Pkg packages
RNo CRAN packages
.NETNo NuGet packages
ElixirNo Mix dependencies
warning

All languages run in isolated environments without network access. External dependencies must be pre-installed in the rootfs image.