Following along the second (C) part of https://craftinginterpreters.com/, but with Rust, because reasons.
Status: done!
Check it out running in your browser: https://abesto.github.io/clox-rs/
Check out NOTES.md for a ton of details, especially around differences vs. clox as a result of using Rust.
On fib(30), about 4x slower than clox. Most of the overhead comes from explicit (safe) memory management using an arena, as opposed to the manual memory management of clox. See NOTES.md for lots of measurments and a breakdown of various optimizations applied.
- Running with
--std,clox-rspasses the complete test-suite ofclox - There's also a small custom test-suite to verify non-
--stdbehavior (challenge solutions and some more informative output) make testexecutes both, with and without GC stress-testing (forced GC after each instruction)