It was initially written in C then ported to rust[0], which seems like it was a good idea. The downside is that it may not be enabled at build time if you don't have the right toolchain/platform, but that seems a good trade off.
0: https://shopify.engineering/porting-yjit-ruby-compiler-to-ru...