Metalogos VM in Rust enforces XSS and SQL injection checks at compile time
Metalogos is a programming language and compiler built in approximately 30,500 lines of Rust that treats security as a type-system concern, making vulnerabilities like XSS and SQL injection compile-time errors rather than runtime risks. The project features two execution backends — a tree-walking interpreter and a 44-instruction bytecode VM — that must produce identical outputs for every program, acting as a structural semantic guarantee. A recent internal audit uncovered 13 subtle divergence points between the two backends, including issues with rule sorting, silent feature unavailability in VM mode, and masked test failures, all of which have since been resolved. The codebase also includes a PEG-based parser with around 180 grammar rules that has remained stable for 18 months, alongside 91 Architecture Decision Records documenting every major design choice. The bytecode VM runs roughly three to five times faster than the reference interpreter, with the crosscheck methodology ensuring that added complexity does not compromise semantic correctness.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in