YJIT
What is YJIT?
YJIT is a lightweight, minmalistic Ruby JIT built inside CRuby.
How to use YJIT?
- Make sure you have Ruby 3.2 installed
- Make sure you have rustc 1.58.0 or newer installed before you install Ruby Check rustc version by running
rustc --version
- Pass the
--yjitcommand line flag to ruby or set theRUBY_YJIT_ENABLEenvironment variable
See also
- Proposal to merge YJIT - https://bugs.ruby-lang.org/issues/18229
- Documentation from Ruby about YJIT - https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md
- Blog post from Shopify on Ruby 3.2's YJIT - https://shopify.engineering/ruby-yjit-is-production-ready