D · online compiler

Run D online

Run D online — D2, browser-hosted, native performance.

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

D is a systems language with the raw performance of C++ but a friendlier syntax, better metaprogramming, and optional garbage collection. Small but committed community; used in production at Netflix, Weka, and inside some parts of the Linux kernel test harness.

ls-judge compiles D with the standard DMD/LDC toolchain inside a Firecracker microVM.

Starter code

What you get in D

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

d
D 2
import std.stdio, std.conv, std.string;
void main() { int n = readln().strip().to!int; writeln(n * 2); }
stdin →21
expected →42
FAQ

Common questions about D on ls-judge

Which D compiler?
DMD (the reference), pinned to a stable D2 release.
Can I use DUB packages?
No — sandbox has no network. Standard library and Phobos only.
D1 support?
No — D1 is discontinued upstream.
Is it free?
Yes.
Further reading
Also try