This past week a lot of new code for the Rust “gccrs” front-end began being merged for the upcoming GCC 15.1 stable release… The Polonius borrow checker landed along with other big improvements to the Rust code ahead of this annual GNU Compiler Collection release. A third round was merged on Friday adding yet more gccrs features.
Arthur Cohen of Embecosm landed another set of 146 patches into the GCC 15 codebase on Friday. This third round includes support for Rust’s “if let” statements, and some reported massive changes to their AST/HIR internal representations, and support for Clone and Copy being fully implemented.
Support for PartialOrd and PartialEq is also still expected to be upstreamed for gccrs before the GCC 15.1 stable release. Cohen commented with the third set of patches cover letter:
“This is our the third patchset in the series for updating upstream GCC with the latest changes in our development repository.
Most notably this contains handling for if-let statements by Marc Poulhiès, changes to our name-resolution pass rewrite, and massive changes to our AST and HIR representations to allow Rust lang-item paths to be represented. This is different from how the official Rust compiler handles lang-items, but allows us to refer to essential Rust items easily while we are still in the process of compiling said core crate.
These lang-item changes also enabled us to continue our work on built-in derive macros, with Clone and Copy being fully implemented in this patchset. The remaining built-in derive macros will be upstreamed in the next patchset. We are still missing on PartialOrd and PartialEq, which will be upstreamed in time for 15.1.
There are also multiple type-system fixes, and testsuite fixes for systems with different endianness.”
It’s great seeing the many gccrs improvements land in time for the GCC 15 stable release in order to make the gccrs front-end more practical and useful as an alternative to Rust’s official LLVM-based rustc compiler.