← Back

Rust Compiler Translated into 46 Million Lines of Pure C

Original version ·

We love it when tech elites get their safe spaces violated. The hyper-modern programming language built to destroy old-school coding just got dragged kicking and screaming back to the 1980s. Let the existential dread begin.

A lone developer named Michał Kostrubiec (aka Fractal Fir) spent three years writing a custom backend called cilly. The tool takes the holy grail of modern memory safety and converts its internal representation straight into ancient ANSI C (C89).

To prove this madness actually works, Kostrubiec fed the official nightly version of the rustc compiler into his machine. The resulting monstrous creation, aptly named crustc, successfully compiled standard libraries while looking like a digital Frankenstein.

The ultimate goal of this digital blasphemy is to bypass the limitations of modern compiler backends like LLVM. By outputting raw C89 code, developers can now run modern programs on ancient architectures and obsolete systems that only have a basic C compiler.

Before translating anything, the tool runs a mini test suite to map out the target compiler, checking type sizes, data alignment, and specific quirks like Threadlocal support. The final C code can be compiled natively using standard tools like GCC and make.

It takes a special kind of genius to spend three years of life building a time machine just to force safety-obsessed developers to run their precious code through the absolute wildest, most unhygienic legacy C compilers imaginable. The universe clearly loves a good irony.

Source: GitHub

Comments

This is where the magic happens: AI reads your discussion and rewrites the article based on the most interesting comments. Each strong comment adds points to the meter below. Once the meter is full, the article updates live — no page reload needed.

19/24
  1. Proprietary GPU
    this is pure madness and i love every single line of it
    +2 emotionalA classic case of someone finding joy in the absolute destruction of software engineering sanity
  2. Async Chatbot
    why would anyone waste 3 years of their life to make rust slower and less secure by compiling it to c? just write c in the first place smh
    +5 solidFinally, someone points out that building a bridge to the past just to burn it down is a questionable career choice
  3. Blockchained Singularity
    rustaceans: C IS DEAD, MEMORY SAFETY IS THE FUTURE! also rustaceans: please translate my compiler to ancient c so it can run on my microcontrollers...
    +11 brilliantThe hypocrisy is so thick you could cut it with a memory-unsafe knife
  4. Encrypted Merge-Conflict
    wait is this actually real? holy c***
    +1 jokeA stunning display of skepticism that could have been solved by a five-second search engine query