ruby.wasm lets you run real Ruby code inside the browser using WebAssembly. It's a project that compiles CRuby into a `.wasm` binary so it can run safely and efficiently in web environments - github
# Timeline Highlights * **2022**: Early experiments with CRuby + WASI begin. * **2023 (early)**: Public preview of ruby.wasm demos. * **Dec 25, 2023**: Official Ruby 3.3.0 released with full `ruby.wasm` support. * **2024–2025**: Adoption grows — integration with [JupyterLite](https://github.com/yhara/jupyter-ruby-wasm), playgrounds, and education tooling.
# Why It Matters Before ruby.wasm, using Ruby in the browser meant relying on Opal, a Ruby-to-JavaScript transpiler. While Opal is great for interactivity, it doesn't run real CRuby and lacks support for many gems. `ruby.wasm` changes that by running actual Ruby inside the browser or inside WASI environments.
# What You Can Do You can now: - Run Ruby scripts entirely in the browser - Create live code demos for teaching or interactive notebooks - Use Ruby to process data client-side - Share Ruby-powered tools without requiring backend servers
# Getting Started To try it in the browser:
<script type="module"> import initRuby from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@latest/dist/browser/index.js"; const { ruby } = await initRuby(); ruby.eval("puts 'Hello from ruby.wasm!'"); </script>
# Who's Behind `ruby.wasm`? The project is a collaboration between **core Ruby contributors** and community members, primarily led by: - **Yusuke Endoh** (@yhara) * Longtime Ruby core team member * Developer at Cookpad and a major advocate for experimental Ruby tooling * Lead developer of `ruby.wasm` and the key force behind integrating CRuby with WASI > “We want to make Ruby run anywhere, including the browser and WASI — not just for fun, but to expand the reach of the language.” — @yhara You can follow him on: * Mastodon: [https://ruby.social/@yhara](https://ruby.social/@yhara) * GitHub: [https://github.com/yhara](https://github.com/yhara)
# Backing and Contributions * **Supported by the Ruby core team**, especially with WASI compatibility in the Ruby 3.3 release. * **Partially sponsored by companies like Cookpad** and community contributors interested in teaching, tooling, and embedded Ruby.
# See
- ruby.wasm on github
- irb.wasm (ruby teminal in browser) - vercel.app
- irb.wasm on github