Basile Starynkevitch <bas...@starynkevitch.net> writes:

> Hello Bright Andoh,
>
>> 
>> My name is Bright Andoh, and I’m a Computer Engineering student at the
>> University of Alabama. I’m wrapping up my freshman year and have
>> experience working with Rust and C. Last fall, I collaborated on some
>> Rust projects with a friend, and I’m eager to deepen my understanding,
>> especially in compiler development and large codebases.
>> 
>
> Long time ago, I did contribute to GCC (its plugin infrastructure).
> https://arxiv.org/pdf/1109.0779 (perhaps this paper could be relevant to you)
>
> A possible approach to your goal might be:
>
> become familiar with GCC code base so be able to compile it (on a Linux
> computer) from source code. Be prepared to spend a few days on that.
>
> be able to run the GDB debugger on the GCC compiler (actually its cc1). Be
> prepared to spend a few days on that.
>
> study the source code of the existing Rust compiler 
> https://www.rust-lang.org/,
> only the front-end (e.g. macros & ownership things).
>
> Adapt it to GCC using libgccjit. This means understanding the current rust
> compiler internals and using libgccjit to feed GCC.
>
> https://gcc.gnu.org/onlinedocs/jit/
>
> so my suggestion could be to prototype your Rust frontend as a GCC plugin (and
> reuse as much as possible existing frontend from  https://www.rust-lang.org/)
>

I'm sorry, but this advice is mistaken/misplaced.

GCC *has* a rust frontend in-tree and it's one of our listed GSoC ideas
to help contribute to it at 
https://gcc.gnu.org/wiki/SummerOfCode#Selected_Project_Ideas.

Not only that, there is additionally a libgccjit backend for the
rust-lang.org implementation of rustc, see
https://github.com/rust-lang/rustc_codegen_gcc.

But this contributor is asking about the former.

> Be sure to put your experimental code on some publicly available website 
> (github
> or something else) for other to review it.
>
> BTW my current open source project is an inference engine, on
> https://github.com/RefPerSys/RefPerSys/
>
>
> Thanks

Reply via email to