[go: up one dir, main page]

Skip to content

ruby-next/ruby-next.github.io

Repository files navigation

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!