Ada · online compiler

Run Ada online

Run Ada online with GNAT — strong typing, contracts, real-time safety without installing a toolchain.

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

Ada is a strongly-typed, contract-driven language born in the DOD ecosystem and still the default choice for aerospace, rail signalling and other systems where a runtime error is not an option. Its type system catches whole classes of bugs at compile time; its tasking model was doing structured concurrency decades before the term existed.

ls-judge runs Ada with GNAT 2012 inside a Firecracker microVM per submission — the same isolation primitive AWS Lambda uses. You get a real gnatmake toolchain, not a sandboxed subset. Bring your own package hierarchy, use SPARK contracts, or just compile a single file.

The playground is free to use with no sign-up. Paste your solution.adb, add a stdin fixture and expected output, and press Run — the verdict streams back as the compiler and runtime finish.

Starter code

What you get in Ada

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

ada
Ada 2012
with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;
procedure Solution is
   N : Integer;
begin
   Get (N);
   Put (N * 2, Width => 0);
   New_Line;
end Solution;
stdin →21
expected →42
FAQ

Common questions about Ada on ls-judge

What Ada compiler does ls-judge use?
GNAT (the reference free Ada compiler), pinned to the Ada 2012 standard. The build invokes gnatmake so multi-file projects work out of the box.
Can I run SPARK-mode Ada?
You can write SPARK contracts in your source — the compiler accepts them — but the automated prover (gnatprove) is not part of the online sandbox.
What is the file name my entry code is written to?
main.adb, and the procedure is Main. Additional files can be added via the multi-file uploader and are compiled together.
Is this sandbox safe for untrusted code?
Every submission runs in its own Firecracker microVM with a fresh kernel, jailer chroot, and network namespace — the same isolation model AWS Lambda uses.
Further reading
Also try