
2/9/2023
What this post added
This post details the technical journey of bringing JavaScript support to Shopify Functions, which are WebAssembly (Wasm) modules. It explains the core principles of Shopify Functions, emphasizing their role in backend customization and the critical role of WebAssembly. The post highlights the constraints imposed on these functions (module size, execution time) and the challenges of running JavaScript in Wasm due to the lack of JIT compilation support. It introduces Javy, a toolchain developed to compile JavaScript to Wasm, and discusses the use of QuickJS as the JavaScript engine. The post also details the initial approach using Wizer and QuickJS crates, which resulted in modules exceeding the size limit. It then explores dynamic linking as a potential solution for reducing module size, acknowledging its current limitations in Wasm standardization.