Emulating aarch64 in software using JIT compilation and Rust
pitsidianak.is
pitsidianak.is
I am curious if you get to DMA before or after QEMU, and if before what your API will look like.
Instead the author uses Cranelift[1] and binja to solve the two interesting problems here.
While cool, I'm not sure if that's interesting enough to read through in its entirety. I use libraries all day every day, but is it the hacker spirit to make your entire project glue-code for libraries that do the thing you claim to do?
It's maybe more philosophical than anything.
I had this philosophical / existential crisis question lately about my project, and I think I'm at peace with it.
Yes. Gluing together stuff (AKA building on other giants' shoulders) can be done in a neglecting, "just hack it all up until starts to work" way, and it can also be done in a reproducible, "unit tested", documented way that enables you to eventually put even more "hacks" on top of it to deliver value.
Anything is "hacker spirit", as long as you make something _functional_ out of pieces that haven't functioning in a way you wanted before. Let it be witty, hackish, or beautiful, maintainable, as long as it holds up your business or gives you simply joy.
It all boils down to getting your hands dirty, instead of passively consuming the products of others.
ps. I'm not saying this project has the same potential as Dropbox or otherwise.
The disassembler is my next step, since it's the easiest to tackle. Swapping binja for a custom solution on the existing code would be relatively straightforward.
The JIT is a completely different beast, it's essentially the IR -> codegen steps of a compiler (meaning without parsing, syntax/lexical analysis, object generation). Seeing as I wanted to target both x86_64 and aarch64 hosts, using an existing solution would get me started faster before I eventually write my own.
My plan is to split the JIT backends and keep cranelift for x86_64 support, but have my own aarch64 JIT also.
You have to pick your battles and assign priorities, you cannot re-invent everything at once.
(Author here)
Literally in the name to hack things apart and hack them back together. It's about taking some unrelated bits and making something from it.