Thanks again to Open Source Security, inc and Embecosm for their ongoing support for this project.
Please note that due to vacations and various events, we did not write a report for the month of April.
Our RustConf talk “Compiling the Linux kernel with gccrs” will also be
given at EuroRust, in Barcelona, Spain. We still have to figure out how
to organize all of the conferences that gccrs will be going to, with
hopefully an appearance at GNU Cauldron and Kangrejos which happen
around the same period.
Upstream has continued with our most recent batch of commits pushed earlier today. Activity around upstreaming had slowed down in May as the main GCC branch was frozen for the GCC 16.1 release, but is now resuming to our weekly target frequency.
The most important news this month is the start of GSoC with our two new students, Janet Chien and Enes Çevik!
Enes will be working on adding support for the alloc crate, a
component on top of the core crate which allows for dynamic memory
allocation. This crate is responsible for a lot of nice Rust types seen
in most Rust programs, such as String or Vec, but also implements
the memory-management types that Rust offers, such as Box or Rc.
Support for this crate is important for general purpose Rust programs,
as it is an essential part of the Rust standard library.
Janet will be focusing on our
Drop infrastructure
in order to automatically run “destructors” on Rust values. While this
is important for preventing memory leaks, it is also essential for
ensuring the correct behavior of Rust programs compiled with gccrs, as
types that manage an inner resource will often clean up this ressource
within their Drop implementation. For example, when a mutex guard is
acquired, the lock is automatically released when the guard gets
dropped. Without proper Drop calls, the lock is never released, and a
lot of Rust programs would not function correctly.
Finally, Zhi Heng is joining us this
summer as part of an Open Source Security internship and will be working
on getting Linux to compile with gccrs. His work will focus on fixing
gccrs bugs when interacting with the kernel crates and with core,
but also on adding CI to enable us to easily test the compiler on kernel
code. This will help ensure that no regressions are introduced as we
continue working towards this objective.
On the technical side of things, we have made progress on our early name
resolution failures and now properly separate namespaces for later uses
of our resolution maps. This was a huge change in code, which affected
all areas of the compiler, especially later in the pipeline, as so many
processes rely on proper name resolution in order to work. As a result,
all of the complex import and export structures within core now get
resolved and inserted properly, and modules and imports get properly
inserted in the types namespace, which makes gccrs more correct and
more in line with rustc behavior. We ran into certain issues with our
metadata exports, where certain modules and exports were not being
properly output to our metadata files, which caused issues when linking
complex crates together. This showed up when experimenting with the
Linux kernel crates but was not caught by our testcases when previously
working on our metadata. Once again, real code is proving to be very
useful at identifying compiler bugs. This sparked a big rework of our
metadata handling and created new issues for us, which we’ll address in
the coming weeks.
We will have our next monthly community call on the 8th of June 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.
| Category | Last Month | This Month | Delta |
|---|---|---|---|
| TODO | 406 | 409 | +3 |
| In Progress | 118 | 118 | - |
| Completed | 1245 | 1255 | +10 |
| Category | Last Month | This Month | Delta |
|---|---|---|---|
| TODO | 192 | 191 | -1 |
| In Progress | 52 | 52 | - |
| Completed | 619 | 623 | +4 |
| TestCases | Last Month | This Month | Delta |
|---|---|---|---|
| Passing | 10989 | 10945 | +44 |
| Failed | - | - | - |
| XFAIL | 73 | 73 | - |
| XPASS | - | - | - |
Here is the list of overarching milestones gccrs is currently targeting. We’ll use the acronym in the following milestone tables, in the column named “OA Milest.”.
| Milestone | Description | Acronym |
|---|---|---|
| Embedded Rust 1.49 compiler 0.1 | The compiler is able to compile embedded Rust code | EC 0.1 |
| Embedded Rust 1.49 compiler 1.0 | The compiler is able to compile embedded Rust code and produce valid executables | EC 1.0 |
| Rust-for-Linux compiler 0.1 | The compiler is able to compile the Linux kernel | LC 0.1 |
| Rust-for-Linux compiler 1.0 | The compiler is able to compile the Linux kernel and produce a runnable kernel | LC 1.0 |
| General purpose Rust 1.49 compiler | The compiler passes the Rust 1.49 testsuite, and handles general purpose code | GC |
| Milestone | Last Month | This Month | Delta | Start Date | Completion Date | Target | OA Milest. |
|---|---|---|---|---|---|---|---|
| Rust-for-Linux | 25% | 35% | +10% | 1st Nov 2025 | - | - | LC 0.1 |
| Full core Late nameres issues | 24% | 28% | +4% | 1st Dec 2025 | - | - | EC 0.1 |
| Full core Early nameres issues | 95% | 97% | +2% | 1st Dec 2025 | - | - | EC 0.1 |
| Full core Typecheck issues | 12% | 12% | - | 21st Jan 2026 | - | - | EC 0.1 |
| RfL build_error | 100% | 100% | - | - | - | - | LC 0.1 |
| RfL compiler_builtins | 100% | 100% | - | - | - | - | LC 0.1 |
| RfL ffi | 40% | 40% | - | - | - | - | LC 0.1 |
| RfL macros | 0% | 0% | - | - | - | - | LC 0.1 |
| RfL uapi | 0% | 0% | - | - | - | - | LC 0.1 |
| RfL main kernel files | 0% | 0% | - | - | - | - | LC 0.1 |
| Upcoming Milestone | Last Month | This Month | Delta | Start Date | Completion Date | Target | OA Milest. |
|---|---|---|---|---|---|---|---|
| Unstable RfL features | 0% | 0% | - | 7th Jan 2025 | - | 1st Aug 2025 | LC 0.1 |
| Generic Associated Types | 0% | 0% | - | 15th Mar 2025 | - | 15th Jun 2025 | LC 0.1 |
| RfL const generics | 0% | 0% | - | 1st May 2025 | - | 15th Jun 2025 | LC 0.1 |
| frontend plugin hooks | 0% | 0% | - | 15th May 2025 | - | 7th Jul 2025 | GC |
| Handling the testsuite issues | 0% | 0% | - | 15th Sep 2024 | - | 15th Sep 2025 | GC |
| main shim | 0% | 0% | - | 28th Jul 2025 | - | 15th Sep 2025 | GC |
| Final core attributes | 0% | 0% | - | - | EC 0.1 | ||
| Core nightly features | 0% | 0% | - | - | EC 0.1 | ||
| Defered inference | 0% | 0% | - | - | EC 0.1 | ||
| Fn traits fixes | 0% | 0% | - | - | EC 0.1 | ||
| Recursive types | 0% | 0% | - | - | EC 0.1 | ||
| Drop | 0% | 0% | - | - | EC 1.0 | ||
| Pin, PinInit | 0% | 0% | - | - | EC 1.0 |
| 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 |
| Final Inline assembly fixes | 100% | 100% | - | - | GCC 16.1 |