crustc: entirety of `rustc`, translated to C
A developer named FractalFir created "crustc," a project that translates the entirety of Rust's compiler (rustc) from Rust source code into C code. The project uses a specialized transpiler to convert the Rust compiler's source into compilable C, aiming to make it accessible on platforms without Rust support.
Background
- Rust is a systems programming language known for memory safety without a garbage collector. Its official compiler, `rustc`, is written in Rust itself — a situation called self-hosting that creates a bootstrapping problem: to compile Rust, you first need a working Rust compiler.
- This project, `crustc`, aims to mechanically translate the entire `rustc` source code into C code. The result would be a Rust compiler written in C, which could be compiled with any standard C compiler (like GCC or Clang).
- If successful, this would eliminate the need for the multi-step "bootstrap" process currently required to build Rust from source. It would also make Rust toolchains easier to port to new platforms that don't yet have a Rust compiler.
- The author, FractalFir, is known for previous work translating core Rust libraries into C (e.g., `crust`), using an automated transpilation approach rather than manual rewrites. This project extends that effort to the compiler itself.