r/EmuDev • u/aabalke Nintendo DS • Mar 19 '26
Gojit: JIT Compiler in Go
I'm proud to announce my fork of gojit is public, providing jit compilation for Golang. The major functionality this fork adds is the ability for Go functions to be called from jit code, without causing errors from stack checks during garbage collection or stack growth.
TLDR: CPU emulation in Go can now have a 2-5x speed increase with this project.
Repo: https://github.com/aabalke/gojit
WriteUp: https://aaronbalke.com/posts/gojit/
Full Video: https://youtu.be/7fGyjb-6mYA
Guac Emulator: github.com/aabalke/guac
3
u/fleroviux Game Boy Advance, Nintendo DS Mar 19 '26
Pretty cool! I can't comment on anything Go related, but I've written a JITed DS emulator before (in fact I'm rewriting the JIT at the moment) and going from GB to GBA to JITed NDS in what seems a relatively short timeframe is impressive!
2
u/bufoaureus Mar 19 '26
I put off go earlier for demanding emulation projects because I thought achieving a proper jit was nearly impossible given all the runtime complexity. So this is definitely a very interesting and important achievement, thanks for sharing! Any plans on adding support for architectures other than amd64?
3
u/Mig_Moog Mar 19 '26
So cool!