GCC Rust Front-End v4 Posted - Now Cleared For Merging In GCC 13

Written by Michael Larabel in Programming on 6 December 2022 at 06:50 AM EST. 53 Comments
The GCC Rust front-end that provides very preliminary support for the Rust programming language atop the GNU Compiler Collection is now cleared for merging to the mainline codebase!

Earlier this year the GCC steering committee approved Rust while the new front-end code still had to undergo review. Published this morning was the fourth iteration of the GCC Rust front-end patches for review and it's already been declared that this code is now ready for merging.

Arthur Cohen sent out the GCC Rust v4 patches this morning:
This patchset contains the fixed version of our most recent patchset. We have fixed most of the issues noted in the previous round of reviews, and are keeping some for later as they would otherwise create too many conflicts with our updated development branch.

Similarly to the previous round of patches, this patchset does not contain any new features - only fixes for the reviews of the v3. New features will follow shortly once that first patchset is merged.

It is important to reiterate that this GCC Rust front-end is still in early form and isn't as nearly feature complete as the Rust reference compiler built atop LLVM. Features like the borrow checker are still to be implemented.

But with the v4 patches, the code is now in good enough shape for its initial merging. SUSE's Richard Biener shared the good news:
Thanks a lot - this is OK to merge now, thanks for your patience and I'm looking forward for the future improvements.

Thus this Rust front-end is now cleared for being merged. This indeed puts it into GCC 13 which will see its initial stable release (GCC 13.1) around March~April while hopefully by GCC 14 a year later will be a more feature-complete implementation to make it a more viable alternative to the LLVM-based Rust compiler.

Update: In response to the ready for merging on the mailing list, Arthur Cohen has responded to better set expectations for developers excited about this front-end in its current form:
Haha, I appreciate the enthusiasm :) Please note however that despite the language being in, the compiler is still at an extremely early stage. We are still not able to properly compile Rust code in the version that we target, 1.49.

To do anything meaningful with the language, you will also need the core library, which again, we cannot compile yet in its 1.49 version.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week