Analysis updated 2026-05-18
Build a working Rust compiler on hardware that only has a C compiler, enabling Rust where no official toolchain exists.
Cross-compile Rust programs for obscure or legacy targets using the cilly Rust-to-C backend.
Run the Rust compiler on a Linux host and compile for a remote non-standard OS target over a TCP connection.
Study how a Rust-to-C compiler backend probes and adapts to different C compiler capabilities.
| fractalfir/crustc | facex-engine/facex | ammarkov/sam3dbody-cpp | |
|---|---|---|---|
| Stars | 331 | 189 | 563 |
| Language | C | C | C |
| Setup difficulty | hard | moderate | hard |
| Complexity | 5/5 | 4/5 | 5/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires GCC, GNU make, and a specific LLVM version matching the nightly Rust toolchain, building with optimizations may stall on large generated files.
Rust is a programming language. A compiler is the tool that translates code written by humans into instructions a computer can actually run. This repo contains the entire Rust compiler, converted into the C programming language, resulting in 46 million lines of C code. The practical result is that you can now build the Rust compiler itself using GCC, which is one of the oldest and most widely available C compilers in existence. GCC can run on old and obscure hardware that never received official Rust support. This means you can write programs in Rust and still target hardware that would otherwise be incompatible. This is a demo for a larger project called cilly. The cilly toolchain is a Rust-to-C compiler that can translate any Rust code into C, not just the Rust compiler itself. The clever part is that cilly probes the C compiler on your target platform first, checking what features it actually supports, then generates output tailored to that specific compiler and hardware combination. This makes it compatible with obscure or old C compilers that would choke on standard assumptions. A standout feature is network transparency. You can run the Rust compiler on a normal Linux machine while sending the C compilation work over a network connection to another computer running a completely different operating system or processor architecture. The author demonstrated this by compiling Rust programs for an x86 Plan 9 operating system from an ARM64 Linux machine. To build this demo yourself you need GCC, GNU make, and a specific version of LLVM, the code generation library that Rust normally uses internally. Building without optimizations takes about 78 seconds on the author's machine. The cilly toolchain itself is not yet publicly released, this repo is a teaser showing what it can do.
crustc is the entire Rust compiler translated into 46 million lines of C, letting you build a working Rust compiler with only GCC and make to support platforms that have no native Rust toolchain.
Mainly C. The stack also includes C, Rust, GCC.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.