Shopify engineers contributed to the upstream Ruby 3.1.0 release by developing and merging YJIT, a new just-in-time compiler. This post details the process of porting YJIT from C to Rust, highlighting the benefits of Rust's type safety and macro system for managing compiler complexity, as well as challenges with build systems and FFI. The team also explored Zig as an alternative. The Rust porting effort is ongoing, with plans to further decouple machine code generation and add ARM64 support. This work aims to improve performance for web and Rails workloads.
All Shopify trails