A developer has created a prototype compiler named crustc that translates Rust code into C, enabling the Rust compiler to run on systems without native LLVM or GCC support.
A developer has created a prototype compiler named crustc that translates Rust code into C, enabling the Rust compiler to run on systems without native LLVM or GCC support.
The project compiles Rustc version 1.98.0-nightly into roughly 46 million lines of C code, which can be built with GCC and make on a Linux workstation targeting ARM64 Linux.
Build instructions require a path to LLVM libraries, specifically libLLVM.so.22.1-rust-1.98.0-nightly, and can be executed with make -j20.
Without optimizations the build takes about 1 hour and 18 minutes on a typical machine.
The compiler is part of the cilly toolchain, a Rust library that generates C code and acts as a backend plugin for the Rust compiler.
The approach adapts to the capabilities of the target C compiler by generating witness programs that verify support for language features such as thread_local and floating-point size consistency.
The resulting C binary can compile Rust standard library components and user programs, though it currently fails to locate the std crate for the aarch64-unknown-linux-gnu target unless the target is added or the standard library is built from source.
The author notes that the tool is not yet ready for public release and will be made available after further development.
Personal circumstances, including a new job and academic commitments, have limited testing.
The build process embeds optional markers in object files and can generate makefiles for incremental compilation, while also supporting network‑transparent communication with remote C compilers.
The work aims to enable Rust usage on legacy or obscure hardware that only supports the C programming language, addressing a limitation noted by some observers regarding Rust's portability.
- Publisher
- Hacker News
- Reliability
- high
- Published
- 7/3/2026, 10:00:37 AM
- Retrieved
- 7/3/2026, 10:00:37 AM
- Relevance
- 80%
- Confidence
- 85%

