Menu

GitHub - FractalFir/crustc: Entirety of `rustc`, translated to C.
📰
386

GitHub - FractalFir/crustc: Entirety of `rustc`, translated to C.

Hacker News·3 months ago
#RNnGTptP
Reading 0:00
15s threshold

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 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More