Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Emscriptem WebAssembly target + examples #4486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ljulliar
Copy link

@ljulliar ljulliar commented Jun 3, 2019

This is a follow-up to the email I sent Matz last week asking if there was any plan to running Ruby on WebAssembly. I decided to give it a shot. In this pull request you'll find:

  • A new crossbuild file to target Emscripten WebAssembly. For this MRUBY_CONFIG to work you need to install Emscripten on your machine first (emcc compiler)

  • Once you have build the emcc-wasm target go to examples/emcc-wasm and run the compile script to generate the two Web Assembly examples

This proves that we can run mruby in the Emscripten WebAssembly runtime. This is however "just" a demonstrator as what we are showing here is the RiteVM mruby VM running within the Wasm VM. So from a performance standpoint we could do much better if mruby could generate WebAssembly bitcode. I don't know what's the best way of doing this though. Generate WebAssembly directly or "transpile" RiteVM instructions to WebAssembly bitcode ?

Comments, feedback welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant