Anyone writing / building a Ruby 2 WASM compiler ?

People,

Is anyone doing this?

Anyone thought about doing it?

- I would be interested in helping! - I am prob not clued-up enough to
do it by myself . .

Phil.

路路路

On Thu, Mar 25, 2021 at 7:33 AM Philip Rhoades <phil@pricom.com.au> wrote:

People,

Is anyone doing this?

Anyone thought about doing it?

- I would be interested in helping! - I am prob not clued-up enough to do
it by myself . .

Phil.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

--
Regards
Vineeth B S

Is anyone doing this?

Anyone thought about doing it?

- I would be interested in helping! - I am prob not clued-up enough to do it by myself . .

Do you mean compiling MRI to WASM, or compiling Ruby programs to WASM?

Compiling MRI to WASM should be possible with Emscripten.

Now compiling Ruby programs to WASM or regular ASM... that's a
different story. Of course any Ruby program can be written in (W)ASM
in _some way_, after all, MRI itself is compiled to ASM, and the Ruby
code that runs inside is thus proved to be possible under ASM
limitations...

However, because the crazy metaprogramming Ruby allows, there might
not be much room for translating Ruby programs into (W)ASM without
resorting to reimplementing some sort of Ruby interpreter.

I heard there are efforts to make a compiler to translate a _subset of
Ruby_ to machine code, so some bits of Ruby that don't use
metaprogramming or other complicated features could be optimized. But
that's a _subset of Ruby_...

There is also the Crystal lang that might be of interest, a Rubyish
language that compiles to machine code.

路路路

--
pudim (she/her)