crustc ports rustc to C and builds it with GCC
The crustc repository holds C code that GCC and GNU make turn into a working Rust compiler reporting rustc 1.98.0-nightly, which then builds core, alloc and std. It is a demo of cilly, the author's Rust-to-C toolchain, and still needs LLVM at runtime.
- An unoptimized build takes about 78 seconds with make -j20
- It requires libLLVM.so.22.1-rust-1.98.0-nightly from the matching nightly
- cilly probes the C compiler with witness programs to learn its features
- Generated C is target-specific and must be regenerated per platform
Read next
Software