Bun · online compiler

Run Bun online

Run Bun 1 online — the all-in-one JavaScript/TypeScript runtime, bundler, and test runner.

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

Bun is a from-scratch JavaScript runtime built in Zig on top of JavaScriptCore. Startup is fast, `bun test` and `bun install` are dramatically faster than Node equivalents.

ls-judge runs Bun 1 inside a Firecracker microVM. Great for benchmarking JS hot paths without paying Node startup cost.

Starter code

What you get in Bun

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

bun
Bun 1
const lines=[];
process.stdin.on('data',d=>lines.push(d));
process.stdin.on('end',()=>{
  const n=parseInt(lines.join('').trim());
  process.stdout.write((n*2)+'\n');
});
stdin →21
expected →42
FAQ

Common questions about Bun on ls-judge

Which Bun?
Bun 1.x — the stable major.
Node.js compatibility?
Most Node stdlib works. See Bun docs for the compatibility matrix.
bun install / npm packages?
No network in the sandbox. Bring bundled source.
Free?
Yes.
Further reading
Also try