postmodern / ruby-install

Installs Ruby, JRuby, TruffleRuby, or mruby
MIT License
1.91k stars 255 forks source link

Does ruby-install require explicit WASM/WASI support? #422

Open todd-a-jacobs opened 2 years ago

todd-a-jacobs commented 2 years ago

Are WASM/WASI Definitions Required for Ruby-Install?

Ruby 3.2.0 will have improved support for WebAssembly, which has already been merged upstream, but it's unclear whether this will require a separate install beyond Ruby 3.2.0 and whatever NPM packages are required. Will ruby-install need a separate definition for building ruby.wasm with VFS support? Since 3.2.0-preview1 has recently been released, this seems like a timely question to ask.

See Also

postmodern commented 2 years ago

The design philosophy of ruby-install is to just install the ruby use the default options. Any additional ./configure options can be passed in after ruby-install ruby X.Y.Z -- .... It looks like the build instructions for ruby WASM are a bit more involved than simply compiling Ruby. You apparently need the same Ruby version installed as the one you intend to build with WASM support? It also looks like WASI SDK isn't available yet in most package managers? A simple solution might be to just add a section to the README how to reproduce the WASM build instructions using ruby-install, once you've installed the build dependencies.