Re:Rust compiler walk-through – Introduction
by nickpsecurity on Wednesday August 10, 2016 @02:42PM
(#12263922)
I mean, I'm guessing here, but wouldn't simplest way be starting mid-way in the existing Rust compiler to port an intermediate language to GCC? Straight-up compile it to GCC C or whatever GCC does internally. That way, you get the parsing, analysis, etc for free plus any improvements they make. Lots of other languages used this approach.
Re:Rust compiler walk-through – Introduction
by dikaiosune on Wednesday August 10, 2016 @04:33PM
(#12264573)
I'm pretty sure mrustc isn't targeting GCC as a backend, but I'm not sure.
I don't know what approach is being taken by the person working on a GCC backend, but it's entirely possible what you've described is what they're doing.
Re:Rust compiler walk-through – Introduction
by harrytodorov on Thursday August 11, 2016 @07:46AM
(#12267405)
> I'm pretty sure mrustc isn't targeting GCC as a backend, but I'm not sure.
I'm pretty sure your statement is somewhat paradoxical :)
There's also a frequent user of the rust irc channels who is experimenting with writing a GCC front-end for rust. I don't think any code for that is public yet, and I don't know how far along they are.