top | item 47199328

Show HN: A Rust compiler with ownership checking, written in PHP

3 points| mrconter11 | 2 days ago |github.com

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.

discuss

order

No comments yet.