Week_1
June 2025 (288 Words, 2 Minutes)
This is the start of my blog that will document my experience and progress for GSoC 2025 as a contributor for The Rust Foundation, working on my project titled Modernising the `libc` Crate! I also hope this helps inspire any future GSoC students or others in general for contributing to open source!
A short summary of my project is that it is about helping release version 1.0 of `libc`, which requires fixing all the small issues as well as the main meat of the project being rewriting the testing infrastructure that they use, which unfortunately is quite old and fails at parsing newer rust syntax.
Unfortunately, my summer had not yet started during the Community Bonding Period and I was swamped with exams, as a result I was not able to interact with the community as much as I wanted to. We attended a fun meeting with the other contributors where we talked to each other about our projects, I was able to talk with my mentor Trevor Gross and others, who helped point me towards some interesting references for the project. We discussed some of the basic project structure and I mainly spent the free time that I had reading through the references we had compiled, as well as playing around with the libraries we were planning on using.
Once again, due to my exams I had to start the Coding Period 2 days late on the 4th of June, but that didn’t stop me from planning the project in my head whenever I could. Once I was officially free from exams, I started work on the first obstacle towards project completion, namely extracting symbols from the source code so that they can be tested. These thankfully do not include all possible items that can be made in Rust, but do include things like structs, unions, constants, extern function, and extern statics to name a few.
The first week was spent on finalizing the extraction logic as much as possible and stubbing out the next part (which is translating Rust code to C, because tests are run in both languages, to make sure they have the same alignment and size). The library used for the parsing was `syn` and it was an absolute joy to work with, and once again made me realize just how comfortable the Rust ecosystem can be, with its great documentation.
Next week, the goal is to fix any problems in the extraction logic as requested by my mentor, add some sanity tests for the code translation (because having tests for your testing infrastructure is always a good idea :0) and finalize the translation so that test generation can be done with templates and finally those tests can be run!
You can see my progress in the relevant PR.