Hasty Briefsbeta

Bilingual

Async Rust never left the MVP state

3 hours ago
  • #async-rust
  • #embedded-systems
  • #compiler-optimization
  • Async Rust has binary size issues, especially on microcontrollers where every byte counts, due to bloat in generated futures.
  • The compiler generates excessive MIR for async functions, even for simple ones without await points, leading to unnecessary state machines.
  • Proposed optimizations include eliminating panics in the Returned state, removing state machines for futures with no await points, inlining futures, and collapsing identical states.
  • Testing shows potential improvements: 2-5% binary size reduction by removing panics, 0.2% by eliminating state machines for no-await futures, and performance gains with future inlining.
  • The author has submitted a Project Goal and seeks funding (€30k estimated) to implement these compiler optimizations.