crustc: entirety of `rustc`, translated to C

Someone turned Rust’s giant compiler into C, and the comments instantly got chaotic

TLDR: A developer transformed Rust’s main compiler into C so it can run on older and stranger machines, a huge workaround for places modern tools don’t reach. Commenters were torn between admiration, performance questions, conspiracy-style security ideas, and joking that the real headline was the unexplained blender injury.

A developer just pulled off the kind of stunt that makes programmers either cheer, squint, or start a 40-reply argument: they converted the whole Rust compiler into 46 million lines of C, meaning it can now be built with plain old GCC and make. In normal-person terms, that’s like taking a fancy modern machine and rebuilding it so it can run in way more places, including older or oddball systems that usually get left behind. The creator says the real mission is bringing Rust to obscure hardware that can handle C but not newer toolchains, with Plan 9 getting name-dropped as the community’s favorite weird little mascot.

And yes, the comments immediately became the real event. One camp was impressed to the point of awe, with people basically saying, 14 attempts over 3 years? That’s not a side project, that’s a saga. Another crowd went straight into detective mode, asking if this could be used to test whether the official Rust compiler is secretly compromised, which instantly gave the thread a conspiracy-thriller side quest. Others just wanted benchmarks, because in tech-land even a miracle has to post numbers.

But the biggest comic relief came from a totally deranged aside by the creator about putting their left hand in a blender and refusing to explain further. Naturally, commenters declared that the article they really wanted to read. So the mood was clear: half admiration, half wild-eyed curiosity, with a heavy garnish of meme energy and “this is either genius or madness” vibes.

Key Points

  • The article presents crustc as `rustc 1.98.0-nightly` translated into 46 million lines of C that can be built with GCC and make.
  • The generated C output produces a functional Rust compiler that depends on an LLVM shared library and can compile Rust standard libraries such as `core`, `alloc`, and `std`.
  • crustc is described as a showcase for cilly, a broader Rust-to-C toolchain for compiling arbitrary Rust code to C across different targets.
  • cilly adapts generated C to the capabilities of specific compilers and platforms by using witness programs to probe supported features and layout properties.
  • The project's stated goal is to support old or obscure systems that can compile C but lack suitable Rust, LLVM, or GCC support, including remote compilation over TCP.

Hottest takes

"I would’ve read an article about this" — ronsor
"Gotta respect the dedication to a niche interest" — lioeters
"test if the official rust compiler has a backdoor" — taris2
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.