DEV Community

Alessandro Napoli
Alessandro Napoli

Posted on

I'm building a compiler in Rust!!!

Hi!
I'm new to this platform and I want to make my first post.

In these days, i'm writing my own compiler in Rust for a really simple custom language. The syntax is:

let x = 10;
print?("Hello, ");
println?(x);

let y = "Hi";

print?(y);
println?(" Thom");
Enter fullscreen mode Exit fullscreen mode

At the moment the variable declaration supports the u64 and the String type. The print?() are functions, but soon they'll become macro.

Now, I'm writing the codegen and I'm stuck becouse of Assembly. I have to learn it! Never mind. In a few days, I'll complete it.

Please, check the repository if you want (:

Stay tuned OvO

Top comments (2)

Collapse
 
mournfulcord profile image
MournfulCord

Love seeing this kind of enthusiasm. Writing a compiler is a huge project, and tackling assembly is a great next step. You’re doing amazing work; keep it up!

Collapse
 
alessandro_napoli_12 profile image
Alessandro Napoli

Thanks ☺️