Open zicklag opened 3 years ago
Always happy for people to give me some fun reading material - I'll take a look thanks!
Oh and yeah I do have LLVM code-generation - the debug info doesn't work yet, I need to actually reimplement the mess that is target ABI function signature, and I really need to build some binaries, do a load library, and make sure some stuff works.
I really want to use cranelift
for the target code - but since I know LLVM pretty well I thought I'd start with what I know (and what seems to be the logical first integration these days).
Yeah, I would love to have codegen written in Rust for a project, but the security aspect of cranelift is what makes me hesitant to use it over LLVM for anything security sensitive:
LLVM still seems like the most solid option out there for now, but cranelift is exciting to look out for.
Disclaimer: I know nothing about writing compilers, I just look around and entertain the idea of writing cool stuff in different fields. :wink:
Hey there! I just found this and thought it was interesting because I've been thinking about what it would look like to build essentially an LLVM replacement in Rust, not that I have the time or any compiler experience to do so. :)
Still, I found this library called
egg
that could be used for creating the optimizer using equality saturation. After walking through the tutorial I was so amazed by how well it seemed like it could work that I wanted to write a compiler just so I could test out the possibilities for optimization usingegg
.Anyway, this is probably way pre-mature being that it doesn't look like you have code generation yet ( Edit: Oh, wait maybe you do have LLVM codegen ). Take it or leave it, but I thought the idea might be useful. ;)