Turning CDN edge into a Rack web server with ruby.wasm
summary
A Rack adapter runs on CDN edge by compiling Ruby to ruby.wasm and adding Fastly hostcalls implemented as a small C extension to expose headers, body and status, letting Lobster and some Sinatra apps boot with minor Gemfile and path tweaks. Static assets hit the 100+ MB upload limit and WASI is read‑only so file writes fail; Rails and C‑extension gems often break. Performance varies widely — ~1s vs 58ms in a Go edge runtime — so it works but with size, compatibility and latency caveats.
AI-written summary · about
chapters (9)
- 0:00Introduction and speaker background
- 3:59WebAssembly and WASI overview
- 7:58CDN edge computing basics
- 9:28Project motivation and goals
- 13:13Architecture and implementation
- 16:29Migrating Ruby apps to edge
- 19:46Challenges and limitations
- 21:52Performance comparison demo
- 23:39Conclusion and future opportunities
related talks
26mFrom Server to Client: Ruby on Rails on WebAssembly
25mFrom Cloud to Edge computing - Unleashing the power of WebAssembly at the edge
42mExotic Runtime Targets: Ruby and Wasm on Kubernetes and GitOps Delivery Pipelines
32mWASM on Edge Serverless; Make Your Life Easier with Go and TinyGo
31mWith WasmEdge to New Shores
37mRuby on Rack: The Magic Between Request and Response
15mExotic Runtime Targets: Ruby and Wasm on Kubernetes and GitOps Delivery Pipelines
33mKubernetes on the edge: running low-latency workloads with WebAssembly
