Hasty Briefsbeta

Eurydice: a Rust to C compiler (yes)

4 days ago
  • #C
  • #Rust
  • #Compiler
  • Eurydice is a Rust to C compiler aimed at producing readable C code.
  • It addresses barriers to Rust adoption by allowing gradual transitions and maintaining a single authoritative Rust version.
  • The compiler works at the MIR level, leveraging Charon to simplify interaction with rustc.
  • Key challenges include whole-program monomorphization, pattern matching compilation, and ensuring readable C output.
  • Eurydice includes optimizations for code quality, such as peephole optimizations and handling of array repeat expressions.
  • Current limitations include potential layout mismatches between Rust and C objects and strict aliasing violations.
  • Future goals include supporting dyn traits via vtables and expanding the subset of Rust that can be compiled to C.
  • The project is named after the Greek myth of Eurydice, continuing the mythology theme of related projects.