wasmerio/wasmer-ruby

Too much rust too little Ruby

AndyObtiva opened this issue · 1 comments

Summary

The README seems tailored to rust programmers not Ruby yet the project name is wasmer-ruby.

Additional details

Could you please abstract low-level (unimportant) details away and hide them from us Ruby programmers (perhaps in a wiki page or other file) and just give us Ruby programmer tailored instructions instead? I thought that would be obvious on any Ruby project. I just want to run this Opal Ruby project in wasm instead:
https://github.com/AndyObtiva/glimmer-dsl-opal

Don’t you have any automated or fast track Ruby-inside-the-browser instructions? I just want to hack on some Ruby in the browser within seconds and be happy (just like I did with Opal). I don’t want to muck with rust.

Thanks and Godspeed!

Andy Maleh

Hywan commented

The README seems tailored to rust programmers not Ruby yet the project name is wasmer-ruby.

I'm sorry but there is a tiny Rust program to showcase the compilation to WebAssembly, and then how to use it with wasmer-ruby. It's a single blockcode for the entire README.md. I could have written this program with C, Zig, AssemblyScript, Swift, or whatever.

Could you please abstract low-level (unimportant) details away and hide them from us Ruby programmers (perhaps in a wiki page or other file) and just give us Ruby programmer tailored instructions instead?

The README.md contains all the Ruby API to use wasmer-ruby. What else is missing?

I just want to run this Opal Ruby project in wasm instead

I'm not sure I'm following you. Do you want to compile Opal to WebAssembly? Or do you want to run WebAssembly modules inside Opal?

wasmer-ruby is a WebAssembly runtime. It runs WebAssembly modules inside Ruby. It doesn't compile Ruby to WebAssembly.

Don’t you have any automated or fast track Ruby-inside-the-browser instructions? I just want to hack on some Ruby in the browser within seconds and be happy (just like I did with Opal). I don’t want to muck with rust.

If what you want is to run Ruby as a WebAssembly module (so having the Ruby VM compiled as a WebAssembly module), check https://github.com/jasoncharnes/run.rb or https://github.com/ljulliar/rlang.

If what you want is to compile Ruby code to WebAssembly (just like C or Rust compile to WebAssembly), check https://github.com/blacktm/ruby-wasm.