Running JavaScript within Ruby
summary
A Ruby binding called quickjs_rb gem embeds QuickJS (C) to run modern ES2023 JavaScript inside Ruby with sandboxing, captured console logs, and a define_function API that lets Ruby implement JS functions (used to provide a custom fetch). Intl support is added by bundling and compiling locale JS into C. It replaces FaaS for Persona workflows, cutting HTTP requests and costs, and is handling 4 million invocations per day in production.
AI-written summary · about
chapters (10)
- 0:00Introduction and speaker intro
- 2:57Demo of quickJS RB
- 5:46Why build quickJS RB
- 9:42Challenges with function as a service
- 11:07Building the Ruby binding
- 14:19Productizing quickJS RB
- 16:51Key features of quickJS RB
- 19:50Define function feature demo
- 23:33Real-world usage and impact
- 24:58Wrap-up and conclusion
related talks
33mThe Ruby Racer: Under the Hood
30mRunning JavaScript, Python, and Ruby in WebAssembly
46mEmbracing Collaboration with JRuby and JavaScript
35mHow I Learned to Love Javascript
30mDropping down to The Metal™
45mEfficient Ruby to Javascript Compilation and Applications
35mRuby is the Best Javascript
44mJavaScript in WebAssembly? Why and How
