Misc #18761
openprovide an example wasm project
Description
Neither the release notes nor the wasm/README.md include any runnable examples.
Please provide a docker image that can be used to generate a wasm binary (even if it's just "hello world"),
to show how this is supposed to work.
Updated by katei (Yuta Saito) 9 months ago
- Assignee set to katei (Yuta Saito)
Thank you for reporting. ruby/ruby.wasm
repository provides a simple example and prebuilt rubies to try it easily. https://github.com/ruby/ruby.wasm#quick-example-how-to-package-your-ruby-application-as-a-wasi-application
Is this enough for your case, or need more getting started instructions?
Updated by rkh (Konstantin Haase) 8 months ago
grosser (Michael Grosser) wrote:
Neither the release notes nor the wasm/README.md include any runnable examples.
Please provide a docker image that can be used to generate a wasm binary (even if it's just "hello world"),
to show how this is supposed to work.
I assume the final release will have an official .wasm file that ships with it.
Note that the current approach isn't to compile Ruby scripts to wasm, but to compile CRuby itself to wasm and use WASI or a custom interface to run Ruby code (ie, the Ruby code is sent as source code to the wasm binary).
You can find pre-compiled wasm files on GitHub: https://github.com/ruby/ruby.wasm/releases