mruby running in the browser
Ruby C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This project brings mruby to the browser. It uses emscripten to compile the mruby source code into JavaScript and runs in the browser.

Build Status

Since emscripten SDK does not provide pre-built binaries for Linux, we cannot use Travis CI right now. We want to be nice and don't try to rebuild whole LLVM each time we are pushing new code :)

How to Install

Webruby now depends on emsdk to provide emscripten and LLVM infrustructure. To install webruby, following the following steps:

  1. Install emsdk following instructions at here
  2. Install latest incoming version of emscripten sdk(right now webruby still depends on code from incoming branch of emscripten, once this goes into a release version, we will lock the version for better stability)
  3. Activate latest incoming version
  4. Webruby should be able to pick up the correct version of emscripten from emsdk. If not, feel free to create an issue :)


Thanks to @scalone and @sadasant, webruby is already used in production:

However, you might still want to give it a full test before using it in production :)


  • webruby irb - A nice-looking full-fledged webruby irb. Thanks to @joshnuss for his work!
  • Webruby tutorial - minimal example of webruby project, a full description is at here
  • mruby - This is only a minimal demo of web irb, if you want to try out mruby in a browser, I strongly suggest the demo above.
  • geometries - a WebGL example using webruby, mruby-js and three.js. NOTE: from a practical point of view, I agree that this can be easily implemented using JS. However, this demo shows how easy it is to interact with the JavaScript environment using Ruby.


This project is distributed under the MIT License. See LICENSE for further details.