Run Ruby in the browser using WebAssembly
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Workaround worker-loader issue Jan 18, 2019
public Update webapp manifest Feb 14, 2019
scripts Post-eject Jan 5, 2019
src Fix doc typo Jan 24, 2019
.gitignore Initial commit from Create React App Jan 5, 2019
LICENSE Create LICENSE Jan 22, 2019 Updates readme Jan 22, 2019
package.json Run Ruby in a Web Worker Jan 6, 2019
yarn.lock Run Ruby in a Web Worker Jan 6, 2019


Run.rb is a tool to run Ruby code inside the browser.

This project compiles Ruby to WebAssembly. Inside /src/emscripten you'll find (currently) Ruby 2.6.0 and the tooling required to compile Ruby to WASM.

This project was bootstrapped with Create React App, but then we ejected it for WebAssembly reasons.


  • Have an online interface to write and run Ruby code
  • Include the Ruby Standard Library
  • Add the ability to save "snippets" and share them
  • Provide JS libraries for run.rb supported versions of Ruby
    • Something like: <script src=“”> and ruby(“yourcode”) // => Promise
  • You tell us

Compiling Ruby to WASM

To compile Ruby into WebAssembly, you'll need Docker installed.

In the project directory, you can run: make

Available scripts

To run the application locally, you'll need NodeJS and Yarn installed.

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

We sure could use some tests. 😉

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.