Make Rust Faster Than C: workplan

Funders & supporters

<< Back to initiative: Making Rust Faster Than C

Work plan - Phase 1

Milestone 1: State machine codegen

  • Improve RFC 3720 (improved state machines)
  • Identify key rust projects that benefit from #[loop_match]
  • Add experimental support for #[loop_match] to c2rust
  • Evaluate the improvement by comparing the performance of a freshly translated bzip2 using either the original or patched c2rust

Timeline: Nov 2024 - Jun 2025
Status: In progress. Kindly funded by NLnet Foundation.

Milestone 2: Identify performance bottlenecks

  • Complete the improved state machine codegen Rust project goal
  • Merge the #[loop_match] language experiment
  • Research the performance challenges in key projects (e.g. rav1d, ripgrep, zlib-rs, brotli-decompressor)
  • Talk to the maintainers of these key project to pinpoint bottlenecks, and to rust team members to find and help document improvements to the backend
  • Use c2rust to find small code samples where clang generates better assembly than rustc for (effectively) equivalent input
  • Document current cases where rustc generates suboptimal code, or fix the issues, if these are straightforward

Timeline: Apr 2025 - Jun 2025
Effort: 6 person-weeks
Status: In progress. Kindly funded by AWS.

Phase 2

The work of Phase 1 will inform the next steps for this effort. We expect phase 2 will focus on high-reward improvements that require a larger, coordinated effort and collaboration.

We're in the process of gathering input for this phase. This includes understanding prior work and ideas, and balancing expected effort and expected reward. Contact us via rustfasterthanc@trifectatech.org if you want to help.

The steps in organizing this phase include at least:

  • Create a coordinated plan
  • Get commitment of team members, contributers and backers
  • Secure funding
  • Execute the plan
  • Be faster than C ⚡

Timeline estimate: Oct 2025 - Dec 2026
Effort estimate: 2 person-years


<< Back to initiative: Making Rust Faster Than C