Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jasoncharnes/run.rb
Run Ruby in the browser using WebAssembly
https://github.com/jasoncharnes/run.rb
Last synced: about 2 months ago
JSON representation
Run Ruby in the browser using WebAssembly
- Host: GitHub
- URL: https://github.com/jasoncharnes/run.rb
- Owner: jasoncharnes
- License: mit
- Created: 2019-01-05T22:44:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T02:36:29.000Z (over 1 year ago)
- Last Synced: 2024-02-05T16:12:01.474Z (5 months ago)
- Language: JavaScript
- Homepage: https://runrb.io
- Size: 8.65 MB
- Stars: 594
- Watchers: 20
- Forks: 31
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-list - run.rb
- Open-Source-Ruby-and-Rails-Apps - run.rb - Run Ruby in the browser using WebAssembly (Happy Exploring 🤘)
- awesome-stars - jasoncharnes/run.rb - Run Ruby in the browser using WebAssembly (JavaScript)
- awesome-stars - jasoncharnes/run.rb - Run Ruby in the browser using WebAssembly (JavaScript)
README
# Run.rb
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](https://github.com/facebook/create-react-app), but then we ejected it for WebAssembly reasons.
## Goals
- [x] 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: `` and `ruby("yourcode") // => Promise`
- [ ] You [tell us](https://github.com/jasoncharnes/run.rb/issues/new)## Compiling Ruby to WASM
To compile Ruby into WebAssembly, you'll need [Docker](https://www.docker.com/products/docker-desktop) installed.
In the project directory, you can run: `make`
## Available scripts
To run the application locally, you'll need [NodeJS](http://nodejs.org) and [Yarn](http://yarnpkg.com) installed.
In the project directory, you can run:
### `yarn start`
Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.The page will reload if you make edits.<br>
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.<br>
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.