Jumping Feet-First into JS on Wasm
summary
Describes a JIT approach that compiles JavaScript to WebAssembly to run user scripts (e.g., Figma plugins, Shopify functions) safely in a sandbox while improving runtime performance. Covers how to implement a JS→Wasm JIT (project: wingo/wasm-jit), measured performance of that solution, and comparisons with existing runtimes like QuickJS.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:52WebAssembly overview
- 3:35Shopify’s JS on Wasm
- 6:01QuickJS to Wasm
- 8:09Interpreter vs JIT issues
- 10:39SpiderMonkey async JIT
- 12:48SpiderMonkey on Wasm
- 15:20Macroassembler for Wasm
- 18:08Control graph compilation
- 22:24Optimizing control flow
- 26:19Performance test results
- 27:02Cache and call issues
- 28:49Stub compilation
- 30:17Global register access
- 31:41Direct calls inlining
- 33:05Call optimization
- 35:59Final perf vs interpreter
- 36:42Future plans
- 37:45Practical benefits
- 38:29Other languages to Wasm
- 39:32JS via C to Wasm
- 40:15Q&A
related talks
30mWhy Should You Consider JavaScript on WebAssembly?
29mEnter the Sandbox: JS on Wasm
30mWhy Should You Consider JavaScript on WebAssembly?
20mAdopting JavaScript on WebAssembly at Shopify
44mJavaScript in WebAssembly? Why and How
50mWeb Assembly
28mJavy: Creating a toolchain for running JavaScript on WebAssembly
13mKeynote: Wasm from the Inside Out: A Journey Through the Impact of WebAssembly in Production
