Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 924 Bytes

README.md

File metadata and controls

49 lines (30 loc) · 924 Bytes

Ruby Next in browser

Play with Ruby Next right in the browser (powered by ruby.wasm).

Development

Prerequisites

  • Install Rust toolchain:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Now you're ready to:

    bundle install

Building ruby.wasm

Use the following command:

bundle exec rbwasm build -o src/ruby.wasm --ruby-version 3.2

This would build a JS-compatible WASM module. To build JS-free WASM module, use the JS=false env var.

Testing

Using wasmtime, you can verify the JS-free module like this:

wasmtime run --dir ./::/ src/ruby.wasm ruby-next.rb

Running web version

First, install JS deps (yarn install).

Then, run a web server:

yarn dev

Go to localhost:8000 and see it in action!