GSoC 2025

Rewrite Rust lints to operate on our frontend's HIR instead of using GCC's existing infrastructure

Our frontend has mutliple lint passes (mark-live, scanning for dead code, unused variables) which are currently implemented by making use of existing GCC middle-end passes. However, this approach poses certain issues for our frontend, and we would like to instead implement these passes using our frontend's internal representation, and more specifically our HIR.

To facilitate writing these lints, you will first need to introduce a new base HIR visitor class which will allow you to avoid repeating yourself with boilerplate visitor pattern code. Once this is done, you will need to reimplement existing lints to work using this new base visitor class. If time permits, it would be helpful to rewrite other HIR passes to make use of the new visitor framework you will introduce.

This can be both a medium-sized or large project.

Complete name resolution pass rewrite

In order to handle complex imports and exports in the Rust programming language, we have started a rewrite of our name-resolution pass with a new data-structure and a new algorithm for resolving uses. We are planning to get the new algorithm to a working state by Spring 2025, but this rewrite will still be missing some of the features of the old name-resolver. Your goal will be to take care of these features and help us get the name-resolution rewrite to feature-parity with our old algorithm.

This project should be medium-sized.

Improving match expressions and pattern matching

Our frontend is currently lacking support for important Rust patterns such as struct rebinding patterns (destructuring a structure instance's fields and binding them to new names) which prevents us from completing certain compiler milestones, as well as handle existing Rust code within the Rust standard library and Rust-for-Linux project. You will be tasked with improving multiple areas of the compiler in order to improve our handling of match expressions and pattern matching.

This project can be medium-sized or large.

Select a repo