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.
-
Notifications
You must be signed in to change notification settings - Fork 1
🥯 A bytecode compiler and virtual machine for the Lox language in Rust.
License
rmehri01/rlox
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
Repository files navigation
About
🥯 A bytecode compiler and virtual machine for the Lox language in Rust.