Running ruby.wasm on Pure Ruby Wasm Runtime
summary
A pure-Ruby gem runtime implements the WebAssembly core spec and WASI common preview 1 and runs a ruby.wasm build of Ruby by implementing ~192 core instructions and the ~37 host functions Ruby requires; file access works after adding WASI preopens and fixing memory allocation and panic handling. A grayscale Rust wasm test exposes and resolves bitshift and numeric bugs; precomputing block-end targets cuts execution time 43%, memoizing small integers saves ~1s, startup is ~70s, and ARM runtimes show ~50–57% execution-time improvement.
AI-written summary · about
chapters (14)
- 0:00Introduction and welcome
- 1:07What is roite and why
- 3:15WebAssembly basics
- 6:55Why build a pure Ruby runtime
- 8:45Development milestones
- 11:33Implementing WebAssembly instructions
- 13:21Debugging grayscale conversion
- 17:21Running Ruby on roite
- 19:53Making require work
- 23:10Performance measurements
- 25:15Optimizing instance creation
- 27:11Startup time and V function impact
- 27:53Demonstration
- 29:01Future and conclusion
related talks
30mruby.wasm also enables JavaScript to call Ruby libraries.
42mExotic Runtime Targets: Ruby and Wasm on Kubernetes and GitOps Delivery Pipelines
32mBringing WebAssembly outside the web with WASI
29mWhat is Web Assembly and Why Should you Care?
20mUsing Rust and WASM
46mA State Of WebAssembly - The Browser is now a real VM
38mWebAssembly beyond the browser
37mWebAssembly with Rust
