This web content presents a simple, lexically scoped Lisp interpreter operating fully in Rust’s declarative macros. The lisp! macro expands to the computed Lisp value and stringifies it at compile time. The interpreter lacks explicit recursion but utilizes self application for functions. It has 250 lines, supports various Lisp forms, and can even interpret itself with a quine example. There’s also a metacircular interpreter written in the Lisp language. While efficient, the interpreter may have performance issues with complex evaluations. The technical explanation involves simulating an SECD machine. Recommended resources include books on functional programming and research papers. TODO includes adding letrec and recursive defines.
https://github.com/RyanWelly/lisp-in-rs-macros