Not using wasm, but the opal project is already a ruby-to-javascript transpiler.
https://github.com/opal/opal

On Thu, Feb 2, 2023 at 3:13 PM lizhongyou2013--- via ruby-talk <ruby-talk@ml.ruby-lang.org> wrote:
Just an idea: Can we use the latest wasm technology to make ruby code almost completely replace JavaScript (only a few calls like Document.getElementById remain, of course they will also be wrapped in ruby). We can even replace html and css, as long as a part of the code runs before going online, and html and css are generated. In this way, we have both the front end and the back end just like node. Although this is just a guess, if it is successfully implemented, we can get rid of the inelegant JavaScript, and it is also an impact on the market, bringing Ruby to more people. Disclaimer again: the above is just my immature conjecture, if there are any omissions, please accept it.
 ______________________________________________
 ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
 To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
 ruby-talk info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-talk.ml.ruby-lang.org/