Crystal · online compiler

Run Crystal online

Run Crystal online — Ruby-like syntax, static types, native performance.

Version
Firecracker microVM live per-test verdicts multi-file compile

Crystal reads like Ruby but compiles to native code with type inference across the whole program. If you like Ruby ergonomics and want C-adjacent performance, this is the direct path.

ls-judge compiles Crystal 1.x with the standard compiler inside a Firecracker microVM. Cold compile times matter here — the timeout budget accommodates them.

Starter code

What you get in Crystal

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

crystal
Crystal 1
n = gets.not_nil!.chomp.to_i
puts n * 2
stdin →21
expected →42
FAQ

Common questions about Crystal on ls-judge

Which Crystal version?
Crystal 1.x — the current stable line.
Can I use shards (package manager)?
No — sandbox has no network. Standard library only.
Why does the first run feel slow?
Crystal compiles ahead of time; on the cold lane the first compile takes a few extra seconds. Subsequent identical submissions are cached.
Is it free?
Yes.
Further reading
Also try