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...
I think this is a Python v.s. CPython sort of confusion- you can run Python code in CPython which can compile to wasm, but you can't directly compile Python source to wasm in a nontrivial way (i.e. just shipping CPython with your source in a single wasm binary doesn't count, sorry, yes I know you heard about the futamura projections yesterday but this isn't actually very interesting)
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?
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.
12 comments
[ 2.9 ms ] story [ 25.6 ms ] thread