Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
GCCrs: A Rust Frontend for GCC (github.com/rust-gcc)
8 points by ibraheemdev on Dec 17, 2020 | hide | past | favorite | 4 comments


There was a thread posted on the rust forum titled "Call for help implementing an independent Rust frontend for GCC" [0]:

> A friend of mine has been talking about the need for a Rust frontend for GCC to allow Rust to replace C in more places, such as system software. To allow some types of safety-critical software to be written in Rust, the GCC frontend would need to be an independent implementation of Rust, since the relevant specs require multiple independent implementations (so just attaching GCC as a new backend for rustc wouldn't work).

> The goal is definitely not to have a compiler written in rust that compiles rust code [edit: unless there is an acceptable bootstrap process, and the final compiler produces GNU assembly output that compiles with GNU gas]

> The goal is definitely not to have a hard critical dependence on LLVM.

> The goal is to have code added, written in c, to the GNU Compiler Collection, which may be found here https://gcc.gnu.org 20 such that developers who are used to gcc may compile rust programs and link them against object files using binutils ld.

0: https://users.rust-lang.org/t/call-for-help-implementing-an-...


Compiler monoculture has always caused problems historically. LLVM monoculture is no better. It is great to see more compiler diversity in the Rust ecosystem with a GCC frontend and the move to cranelift by rustc


I wonder what the rust core team's stance is on projects like this?


Supportive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: