# Mu for Dynamic Languages: Retargeting the RPython JIT to a Micro Virtual Machine Zixian Cai Australian National University Mu is designed to provide abstractions over memory, hardware and concurrency, while remaining minimal, to make it easier to implement dynamic languages well. We have already targeted RPython to Mu, which makes it possible to have existing implementations of dynamic languages in RPython running on top of Mu. To make them performant, the JIT backend of RPython also needs to be retargeted. However, the current design of RPython's JIT assumes that the backend emits machine code, i.e. targeting bare-metal. Therefore, it is difficult to implement a VM backend, because of the loss of high level type information, leaky abstractions, etc. In this talk, we are going to discuss our initial attempt to retarget the RPython JIT to Mu. Our goal is to implement a Mu backend for RPython JIT, in order to demonstrate that the design of Mu provides sufficient facilities for clients to implement JIT for dynamic languages. We mapped abstractions between the RPython JIT and Mu. We implement carrying high level type information through the encoding and decoding of jitcode, as well as using facilities in the Mu VM to implement guards, loops and bridges. The lessons learnt here might be helpful to implement other backends for RPython.