A tail-call interpreter in (nightly) Rust (mattkeeter.com)
Matt Keeter describes building a tail-call–based Uxn CPU interpreter in nightly Rust, using the new `become` feature to ensure dispatch compiles into true tail calls rather than growing the call stack. The resulting VM keeps state in function arguments (optimized like registers) and outperforms both his earlier Rust and hand-written ARM64 assembly in benchmarks, though the x86 results are mixed and still behind his assembly backend. He also shares implementation details, including a macro to generate the tail-call functions for different opcode signatures, and notes codegen/performance observations from generated machine code.
April 05, 2026 16:05
Source: Hacker News