rustgo: a from-scratch Rust compiler written in Go, mirroring rustc's pipeline

rakyll · x · 2026-11-05

A GitHub project, lassejlv/rust-go-compiler (rustgo), implements a Rust compiler entirely in Go, compiling Rust source to native executables. Its pipeline mirrors rustc's crate layout — lexer, parser/AST, macro expansion (macrorules!, #[derive], #[cfg]), name resolution, type inference — but uses GNU C as its backend IR where rustc uses LLVM IR. Early-stage project with 253 commits.

Original post →

More from coding & agent

coding & agent channel →