
Compile Ruby into WebAssembly - pmontra
https://github.com/jasoncharnes/run.rb
======
_hardwaregeek
I'm a little confused by this. Did someone manage to write a YARV to WASM
compiler? I kind of doubt this is a wholly new Ruby to WASM compiler, so my
best guess would be a YARV to WASM compiler. Except...even that would be
tricky since Ruby has a notoriously complicated runtime. Just looking at this
though, it looks like they just compiled an existing Ruby implementation to
WASM via Emscripten. But that's not really compiling Ruby to WASM then...

~~~
mcpherrinm
Yeah, look like it is compiling Ruby (the interpreter, aka MRI or CRuby), not
programs written in the language Ruby.

~~~
paradoxparalax
So , the maximum you can get from it is the console log text return of the
script you paste there. right? Or you can glue your script with anything like
webgl or canvas there to do anything?

~~~
thefounder
WASM doesn't provide DOM access so you can't use anything useful on the web
unless you callback through a bunch of JS.

~~~
ericb
I imagine that is some sort of intentional sandboxing? I didn't know about
that and find myself surprised. In principal I'm not sure why it wouldn't be
able to provide direct DOM access. I'd love to hear more background on this if
you know it.

~~~
markdog12
It's coming: [https://github.com/WebAssembly/host-
bindings/blob/master/pro...](https://github.com/WebAssembly/host-
bindings/blob/master/proposals/host-bindings/Overview.md)

------
trzeci
I'm proud that this project's Dockerfile bases on mine :D Didn't expect it
will be used widely.

