DevTools Logo

Ruby Playground

About this tool

Ruby runs as CRuby compiled to WebAssembly. The first Run fetches the VM; your program is evaluated locally afterwards.

This is a real interpreter, not a syntax highlighter. Native gems and network installs are out of scope.

How to use this tool

  1. First Run

    Wait for ruby.wasm to download (~12 MB, then cached).

  2. puts

    Standard output is captured into Output.

  3. Stay in stdlib

    Do not expect bundler or native extensions.

Frequently asked questions

How does Ruby run in a browser?

CRuby compiled to WebAssembly (ruby.wasm). First Run downloads the VM (~12 MB); later runs use the browser cache.

Is my Ruby uploaded?

No. The CDN fetch is the interpreter binary. Your source stays in this tab.

Can I gem install?

No. Only what the stdlib WASM build includes. Nokogiri and native gems will not load.

Why is the first Run slow?

The WASM module has to download and compile once. After that, eval is typically well under a second.