Rust: Compiling the alloc crate - Status Report 5
GCC Rust (gccrs) project reports progress on compiling the Rust alloc crate, with merged lang items and new unsized ADT support.
This is the fifth status report for the GSoC project on compiling the Rust alloc crate with GCC Rust (gccrs). Key achievements this week include implementing four missing language items, with two already merged, and implementing infrastructure for unsized ADT coercion, enabling support for unsized ADTs and array-to-slice coercions. However, compilation of the mock core is blocked by trait solver issues, preventing progress on the alloc testsuite.
- proposer
Reports progress on compiling the Rust alloc crate with GCC Rust, including merged lang items and new unsized ADT support, but notes blockers due to trait solver issues.
In Details
This report details progress on the GCC Rust frontend (gccrs) attempting to compile the standard Rust 'alloc' crate. The effort involves implementing missing Rust language features (lang items) and general Rust frontend infrastructure within GCC. The immediate goal is to make the 'alloc' crate compilable, which is a stepping stone towards full Rust standard library support in GCC.
- GCC Rust (gccrs)
- The Rust frontend project for the GNU Compiler Collection, aiming to provide a Rust compiler implemented in C++ using GCC infrastructure.
- alloc crate
- A fundamental crate in the Rust ecosystem that provides memory allocation primitives, which is essential for building larger programs and for the Rust standard library.
- lang items
- Special items in Rust that are fundamental to the language's operation, such as
sized_instanceordrop_in_place. The compiler relies on these for core functionality, and they need to be implemented by the frontend. - unsized ADT
- An Abstract Data Type in Rust whose size is not known at compile time, such as dynamically-sized types (DSTs) like slices or trait objects. Support for these is complex and crucial for many Rust features.
- trait solver
- The component within a Rust compiler responsible for determining if and how trait bounds are satisfied by concrete types. Issues here can block compilation of significant amounts of code.