mruby running in the browser
Ruby C
Switch branches/tags
Nothing to show
Clone or download
xxuejie Merge pull request #18 from sadasant/master
More control over the print_level
Latest commit 9f6952c Oct 29, 2015
Failed to load latest commit information.
bin Fix prompt Jul 17, 2013
driver Dump results when we have a print level greater than 0 Oct 27, 2015
lib Load ~/.emscripten when available Jan 28, 2015
modules Update mruby to the latest revision before mrbtest changes to a gem, we Oct 27, 2015
scripts making sure opts.print_level is a number Oct 29, 2015
templates/minimal Load ~/.emscripten when available Jan 28, 2015
.gitignore Add patch to mruby. The patch would change to use c++ exception inste… Nov 7, 2012
LICENSE Well, I changed my mind, this is still something feasible Oct 22, 2015
webruby.gemspec Bump version Jan 28, 2015


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.