rlox

🥯 A bytecode compiler and virtual machine for the Lox language in Rust.

MIT License

Stars
9

rlox

An implementation of the Lox language from the amazing Crafting Interpreters book in Rust! It passes all 246 of the tests provided and is 2-7x faster than jlox but around 1.5x slower than clox on my machine. I did a bit of profiling with cargo-flamegraph and cargo-instruments to optimize the hot paths but didn't want to spend too much time optimizing everything. It's also all safe Rust right now, though using some unsafe features could probably make it just as fast as clox.