On Fri, 2025-02-28 at 12:54 +0100, Basile Starynkevitch wrote: > 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/) > > Be sure to put your experimental code on some publicly available website > (github > or something else) for other to review it. >
BTW (assuming your computer is running Linux) a nice feature to have in your Rust front-end is it to be multi-threaded. -- Basile STARYNKEVITCH <bas...@starynkevitch.net> 8 rue de la Faïencerie 92340 Bourg-la-Reine, France http://starynkevitch.net/Basile & https://github.com/bstarynk