Hi! I put together a Rust compiler written in PHP. It takes Rust source code and outputs x86-64 Linux binaries directly. No LLVM, no assembler, no linker.
It has a working ownership checker, borrow checker, type checker, structs, functions, control flow, and mutable references. The test suite has 80+ cases. The whole thing is around 2,500 lines of PHP.