GCC Front-End For Rust

Alternative Rust Compiler for GCC

View the Project on GitHub

August 2025 Monthly report

Overview

Thanks again to Open Source Security, inc and Embecosm for their ongoing support for this project.

Project update

The month of August was focused on bug fixing for building core, once again. We identified some issues in our macro expansion and reworked our ExpandVisitor, a piece of code we had originally written 3 years ago which contained some shortcomings and would not expand macro invocations in all places required. We implemented a new visitor to visit nodes from their container, and potentially reseat their pointer - which fixed a lot of the issues and increased the completeness of the compiler. We then transformed all of our mutating visitors into visitors inheriting from this container visitor, which resulted in a cleaner codebase and a more correct front end.

Google Summer of Code also came to an end, with both our students Ryutaro Okada and Zhi Heng successfully completing their projects and earning top scores in their final evaluations. It was a joy to work alongside them on their projects, and we hope to see them contribute in the future.

As a reminder, our current objective is to get gccrs to a state where it can compile the Linux kernel’s Rust parts. The Rust-for-Linux project does not depend on the entire Rust standard library (std), but only on core - like a lot of Rust embedded projects. However, because the project wants to benefit from all of Rust’s functionalities, they are reimplementing parts of the standard library using the kernel’s memory allocator - this enables Rust kernel module developers to use types such as Vec<T>, or String. As such, the milestones we worked on this summer are aimed at two objectives:

  1. Compile Rust’s core library, as it is the sole dependency of the Linux kernel’s Rust crate
  2. Compile the Rust kernel crate

In order to do this, we had to implement some new Rust features over the summer: namely, try blocks and while-let loops, both used in core and within the kernel. The kernel makes use of more recent Rust features that are not present in the version we target, so we must implement them as well - for example, the offset_of macro.

Our first objective is the kernel’s alloc crate, a reimplementation of parts of the Rust std crate responsible for implementing dynamically allocated types. Thanks to the work of our contributors over the summer, we were able to implement all of the required language features mentioned above. We are now debugging a few remaining bugs in our name resolution and macro expansion passes.

The next two weeks of work on the project will be focused on these bugs, and the last two weeks of the month of September will be solely dedicated to compiling the Linux kernel’s alloc crate.

We are currently interviewing two interns who would contribute to the project for the period of September to January - we are currently designing milestones for them, so that they may contribute meaningfully to the project while gaining work experience within our company Embecosm SAS.

Finally, we will also be present at three major conferences in September:

Pierre-Emmanuel and Arthur will be giving talks at these three venues and we hope to meet with everyone interested in the project!

Community call

We will have our next monthly community call on the 8th of September at 9am UTC. You can subscribe to our calendar to see when the next one will be held. The call is open to everyone, even if you would just like to sit-in and listen. You can also subscribe to our mailing-list or join our Zulip chat to be notified of upcoming events.

Call for contribution

Completed Activities

Contributors this month

Overall Task Status

Category Last Month This Month Delta
TODO 469 396 -73
In Progress 109 110 +1
Completed 1114 1135 +21

Bugs

Category Last Month This Month Delta
TODO 207 198 -9
In Progress 54 49 -5
Completed 526 558 +32

Test Cases

TestCases Last Month This Month Delta
Passing 10089 10189 +100
Failed - - -
XFAIL 64 64 -
XPASS - - -

Milestones Progress

Milestone Last Month This Month Delta Start Date Completion Date Target Target GCC
Final Inline assembly fixes 65% 100% +35%   -   GCC 16.1
Upcoming Milestone Last Month This Month Delta Start Date Completion Date Target Target GCC
Unstable RfL features 0% 0% - 7th Jan 2025 - 1st Aug 2025 GCC 16.1
Generic Associated Types 0% 0% - 15th Mar 2025 - 15th Jun 2025 GCC 16.1
RfL const generics 0% 0% - 1st May 2025 - 15th Jun 2025 GCC 16.1
frontend plugin hooks 0% 0% - 15th May 2025 - 7th Jul 2025 GCC 16.1
Handling the testsuite issues 0% 0% - 15th Sep 2024 - 15th Sep 2025 GCC 16.1
main shim 0% 0% - 28th Jul 2025 - 15th Sep 2025 GCC 16.1
Final core attributes 0% 0% -   -   GCC 16.1
Core nightly features 0% 0% -   -   GCC 16.1
Defered inference 0% 0% -   -   GCC 16.1
Fn traits fixes 0% 0% -   -   GCC 16.1
Recursive types 0% 0% -   -   GCC 16.1
Drop 0% 0% -   -   GCC 16.1
Pin, PinInit 0% 0% -   -   GCC 16.1
Past Milestone Last Month This Month Delta Start Date Completion Date Target Target GCC
Data Structures 1 - Core 100% 100% - 30th Nov 2020 27th Jan 2021 29th Jan 2021 GCC 14.1
Control Flow 1 - Core 100% 100% - 28th Jan 2021 10th Feb 2021 26th Feb 2021 GCC 14.1
Data Structures 2 - Generics 100% 100% - 11th Feb 2021 14th May 2021 28th May 2021 GCC 14.1
Data Structures 3 - Traits 100% 100% - 20th May 2021 17th Sep 2021 27th Aug 2021 GCC 14.1
Control Flow 2 - Pattern Matching 100% 100% - 20th Sep 2021 9th Dec 2021 29th Nov 2021 GCC 14.1
Macros and cfg expansion 100% 100% - 1st Dec 2021 31st Mar 2022 28th Mar 2022 GCC 14.1
Imports and Visibility 100% 100% - 29th Mar 2022 13th Jul 2022 27th May 2022 GCC 14.1
Const Generics 100% 100% - 30th May 2022 10th Oct 2022 17th Oct 2022 GCC 14.1
Initial upstream patches 100% 100% - 10th Oct 2022 13th Nov 2022 13th Nov 2022 GCC 14.1
Upstream initial patchset 100% 100% - 13th Nov 2022 13th Dec 2022 19th Dec 2022 GCC 14.1
Update GCC’s master branch 100% 100% - 1st Jan 2023 21st Feb 2023 3rd Mar 2023 GCC 14.1
Final set of upstream patches 100% 100% - 16th Nov 2022 1st May 2023 30th Apr 2023 GCC 14.1
Borrow Checking 1 100% 100% - TBD 8th Jan 2024 15th Aug 2023 GCC 14.1
Procedural Macros 1 100% 100% - 13th Apr 2023 6th Aug 2023 6th Aug 2023 GCC 14.1
GCC 13.2 Release 100% 100% - 13th Apr 2023 22nd Jul 2023 15th Jul 2023 GCC 14.1
GCC 14 Stage 3 100% 100% - 1st Sep 2023 20th Sep 2023 1st Nov 2023 GCC 14.1
GCC 14.1 Release 100% 100% - 2nd Jan 2024 2nd Jun 2024 15th Apr 2024 GCC 14.1
format_args!() support 100% 100% - 15th Feb 2024 - 1st Apr 2024 GCC 14.1
GCC 14.2 100% 100% - 7th Jun 2024 15th Jun 2024 15th Jun 2024 GCC 14.2
GCC 15.1 100% 100% - 21st Jun 2024 31st Jun 2024 1st Jul 2024 GCC 15.1
Unhandled attributes 100% 100% - 1st Jul 2024 15th Aug 2024 15th Aug 2024 GCC 15.1
Inline assembly 100% 100% - 1st Jun 2024 26th Aug 2024 15th Sep 2024 GCC 15.1
Rustc Testsuite Adaptor 100% 100% - 1st Jun 2024 26th Aug 2024 15th Sep 2024 GCC 15.1
Borrow checker improvements 100% 100% - 1st Jun 2024 26th Aug 2024 15th Sep 2024 GCC 15.1
Deref and DerefMut improvements 100% 100% - 28th Sep 2024 25th Oct 2024 28th Dec 2024 GCC 15.1
Indexing fixes 100% 100% - 21st Jul 2024 25th Dec 2024 15th Nov 2024 GCC 15.1
Iterator fixes 100% 100% - 21st Jul 2024 25th Dec 2024 15th Nov 2024 GCC 15.1
Auto traits improvements 100% 100% - 15th Sep 2024 20th Jan 2025 21st Dec 2024 GCC 15.1
Lang items 100% 100% - 1st Jul 2024 10th Jan 2025 21st Nov 2024 GCC 15.1
alloc parser issues 100% 100% - 7th Jan 2025 31st Jun 2024 28th Jan 2025 GCC 15.1
std parser issues 100% 100% - 7th Jan 2025 31st Jun 2024 28th Jan 2025 GCC 16.1
Question mark operator 100% 100% - 15th Dec 2024 21st Feb 2025 21st Feb 2025 GCC 15.1
Name resolution 2.0 rework 100% 100% - 1st Jun 2024 - 1st Apr 2025 GCC 15.1
Macro expansion 100% 100% - 1st Jun 2024 - 1st Jan 2025 GCC 15.1
Remaining typecheck issues 100% 100% - 21st Oct 2024 - 1st Mar 2025 GCC 15.1
cfg-core 100% 100% - 1st Dec 2024 24th Mar 2025 1st Mar 2025 GCC 15.1
Codegen fixes 100% 100% - 7th Oct 2024 1st Apr 2025 1st Mar 2025 GCC 15.1
black_box intrinsic 100% 100% - 28th Oct 2024 - 28th Jan 2025 GCC 15.1
let-else 100% 100% - 28th Jan 2025 - 28th Feb 2025 GCC 15.1
Specialization 100% 100% - 1st Jan 2025 1st Apr 2025 1st Mar 2025 GCC 15.1
cfg-rfl 100% 100% - 7th Jan 2025 19th Mar 2025 15th Feb 2025 GCC 15.1
Downgrade to Rust 1.49 100% 100% - 14th Mar 2025 26th Mar 2025 1st Apr 2025 GCC 15.1
try blocks 100% 100% -   30th Jul 2025   GCC 16.1
while-let loops 100% 100% -   30th Jul 2025   GCC 16.1
offset_of!() builtin macro 100% 100% - 15th Mar 2025 4th Aug 2025 15th Aug 2025 GCC 16.1
Explicit generics with impl Trait 100% 100% - 28th Feb 2025 21st Jul 2025 28th Mar 2025 GCC 16.1

Planned Activities