rustc-php rewrites Rust compiler in PHP
rustc-php is an experimental PHP-written Rust compiler that emits x86-64 Linux binaries directly and includes ownership, borrow, and type checking. It reads more like a technical stunt and language experiment than a production compiler.
This is the kind of project that makes compiler folks grin and everyone else ask "why," which is exactly why it works. The value here is less about replacing rustc and more about showing how far an absurdly unconventional stack can be pushed.
- –It bypasses LLVM, the assembler, and the linker by generating machine code directly, which is the wildest part of the project
- –The repo claims support for ownership semantics, borrow checking, generics, traits, closures, iterators, and a simplified runtime
- –The unfinished list is still substantial, so this is not a practical Rust replacement yet
- –Community reaction leans toward delight, disbelief, and "what a horrible idea" admiration, which fits the project's appeal
- –For developers, it is a great reminder that compilers are software, not magic, and that language boundaries are more porous than they look
DISCOVERED
67d ago
2026-03-21
PUBLISHED
67d ago
2026-03-21
RELEVANCE
AUTHOR
Github Awesome