crustc - rustc 1.98.0-nightly (c712ea946 2026-06-16) , converted to 46 million lines of C.
This is a functional Rust compiler you can build with GCC & make .
# We need to provide a path to LLVM(`libLLVM.so.22.1-rust-1.98.0-nightly`) # I *could* include pre-built LLVM in the project, but I'd rather not embed random binaries in the project. make -j20 LLVM_LIB_DIR= ~ /.rustup/toolchains/nightly-2026-06-16-aarch64-unknown-linux-gnu/lib
It is just C code [1], which, when compiled, gives you a functional Rust compiler.
# It works - (library path to point to libLLVM.so.22.1-rust-1.98.0-nightly - rustc uses llvm) LD_LIBRARY_PATH= ~ /.rustup/toolchains/nightly-2026-06-16-aarch64-unknown-linux-gnu/lib:./rustc_driver ./rustc/rustc --version rustc 1.98.0-nightly (c712ea946 2026-06-16)
That Rust compiler can compile code - build core , alloc , std - you name it!
What is this?
This is a demo/teaser for my new Rust to C compiler toolchain. The full cilly toolchain compiles your own Rust to C for arbitrary targets. This repo just shows the compiler compiling itself, as I believe this is the flashiest showcase I could do.
How was this done?
For the past 3 years, I have been working on compiling Rust to C. I made a few public attempts, like rustc_codegen_clr , and a lot of private ones.
... continue reading