Progress toward a GCC-based Rust compiler

The gccrs project aims to implement a Rust compiler in the GNU Compiler Collection (GCC). While the project has made progress, it is not yet complete. Another approach to GCC Rust code generation is available in rustc_codegen_gcc. Gccrs targets Rust version 1.49 and is working on compiling the core and alloc crates of the Rust standard library. However, there are shortcomings, such as incorrect behavior in macro-name resolution and incomplete support for decorator macros. Gccrs also aims to take advantage of GCC’s security plugins and enable Rust programmers to use existing GCC plugins for bug catching. It is still missing core functionality, such as async/await and LLVM intrinsics, but progress is being made. Meanwhile, rustc_codegen_gcc is a more mature project that uses the libgccjit library to hook into the LLVM backend used by rustc. It is upstreamed into the Rust language repository and enables Rust code generation on platforms unsupported by LLVM. The Rust for Linux project documentation supports both rustc and rustc_codegen_gcc for building Rust code for the Linux kernel. Gccrs has made significant progress but is not yet in a usable state for practical purposes. However, it brings us closer to a world with multiple implementations of

https://lwn.net/SubscriberLink/954787/41470c731eda02a4/

To top