Some 145 patches for the Rust "gccrs" front-end were posted today and subsequently merged to GCC Git ahead of the upcoming GCC 15.1 stable release.
A big set of gccrs patches were merged today for enhancing the Rust front-end with the upcoming
GCC 15 compiler release. Most significant to this round of patches is adding the Polonius borrow-checker to the compiler.
borrow checker merged
Arthur Cohen of Embecosm explained in
the patch series prior to committing all of these patches:
"This patchset is the first of four similarly-sized patchsets aimed at updating upstream with our most recent changes to the Rust frontend.
We plan on upstreaming small patchsets every week up to the release of 15.1.
This first set's main change is the addition of the polonius borrow-checker to the compiler, as well as all of the infrastructure required for FFI and interacting with Rust crates in general. As such, an installation of the Rust programming language is now required for building the Rust frontend to GCC. As a reminder, this change is temporary and we are working hard towards supporting enough of the language that we can bootstrap our own requirements.
This patchset also adds some support for inline assembly by taking inspiration from the C frontend. There are also numerous changes for supporting the Rust core library, such as handling more attributes, handling negative trait implementations, built-in derive macros, and more.
I will be following up with the next three patchsets in the coming days."
Exciting times for gccrs and making this Rust front-end increasingly more practical as an alternative to the official LLVM-based Rust compiler.
Read More