Hi!
This is the first report on compiling the alloc crate with GCCRS.
This week I set out to:
- Configure the alloc testsuite.
- Implement the required Rust attributes for the alloc crate,
specifically:
- rustc_allocator
- rustc_allocator_nounwind
- rustc_std_internal_symbol
- Implement the 'oom' and 'exchange_malloc' lang items.
- The 'oom' lang item is required to ensure a function exists
during out-of-memory situations.
- The 'exchange_malloc' lang item is required to ensure a function
exists when Box allocates memory.
Over the week:
- Configured the alloc testsuite. However, expanding it was blocked
by a missing name resolution issue, limiting us to a basic lib.rs
and a mock core. This deficiency was recently fixed, so we expect
the testsuite to continue being expanded in the coming weeks.
- Submitted a pull-request implementing the attributes mentioned above
(Rust-GCC#4556). It is approved by my mentors but we are performing
final checks to ensure correct behavior.
- Postponed the 'oom' lang item implementation, as it is not an
immediate priority.
- Implemented and merged the 'exchange_malloc' lang item
(Rust-GCC#4557).
- Began implementing the 'owned_box' lang item. The core
implementation is done, but I am currently researching edge cases
for expanding the testsuite.
Current status:
- Our first plan is to get the 'owned_box' implementation ready for
merging next week.
- Next, we need to implement the 'box_free' lang item. This is
required to ensure a function exists when Box deallocates memory.
- Then, if time permits, we plan to move on to the implementation of
intrinsics related to fat pointers.
Note: My progress will slow down slightly over the next two weeks
due to university exams.
Best regards,
Enes