https://hiro.codes/read/emulating-an-emulator-inside-itself.-meet-blink
It's Wednesday and i feel like doing something fun. How about playing with an emulator? Blink is a new CPU emulator written in C, made by Justine Tunney. Besides having a really cool name, blink has a lot of impressive features and some of them will blow your mind!
Blink is at least 2 times faster than QEMU, and it is even capable of emulating QEMU. I have not done benchmarks (yet) but trust me
I just got Blink performing twice as fast as Qemu, while reducing Blink's size to 157kb. What makes Blink so tiny and fast is it uses a printf-style DSL for x86/aarch64 JIT code generation. Beta testers wanted.https://t.co/ram0UF24CH pic.twitter.com/fuKFeVxCbG
— Justine Tunney (@JustineTunney) January 3, 2023
That's rather impressive for a relatively new emulator. Only time can tell how much faster it will get with further work and optimizations. Starting fast is always a good thing. You know what they say, fast is ehhhh... good! good!
How small can an emulator be? Blink occupies only 157Kb. Would be interesting to see how this size changes as more features are added.
Me: How small can an emulator be?
— Hiro Ji Shu Zhe (@0x1hiro) January 4, 2023
Blink: Yes.#Blink #Clang #GCC #hacking pic.twitter.com/75iUIQN6Wn
It's a small, fast emulator but there's more! Blink comes with blinkenlights; a nice debugger that runs in the terminal. Much like GDB but way cooler.
The TUI looks cool but it's best feature isn't just the looks, but Reverse-Debugging. One of the newest and most impressive features of Blinkenlights is reverse-debugging. It can go back in time during program execution. Now imagine all the things you can do with that. You can not only single-step forwards but also backwards during execution. That's pretty impressive if you ask me.
I added a reverse debugging feature to Blink, that lets you scroll wheel backwards through execution history. https://t.co/ram0UF24CH pic.twitter.com/h5htBn3qm2
— Justine Tunney (@JustineTunney) January 3, 2023
Blink can emulate GCC.

Blink is now outperforming Qemu by 13% when emulating GCC. There's still so many optimizations I haven't even written yet! https://t.co/ram0UF2Csf pic.twitter.com/yIknkJIdAi
— Justine Tunney (@JustineTunney) December 17, 2022
Just when you thought it was over, Blink emulates Blink Emulating a program. VERY COOL!

Blink is a rather impressive project. Justine Tunney and other contributors deserve some accolades for their work. You can check out Blink on github.