Play with Ruby Next right in the browser (powered by ruby.wasm).
-
Install Rust toolchain:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Now you're ready to:
bundle install
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.
Using wasmtime, you can verify the JS-free module like this:
wasmtime run --dir ./::/ src/ruby.wasm ruby-next.rb
First, install JS deps (yarn install
).
Then, run a web server:
yarn dev
Go to localhost:8000 and see it in action!