CoreLox Playground
Experience Lox interpretation “closer to the metal” with CoreLox—a C-based bytecode interpreter inspired by the Crafting Interpreters book. It lives right here in this Playground, letting you run Lox code right in your browser!
While RustyLox provides memory safety and concurrency, CoreLox strips things down to essentials—offering raw speed, minimal overhead, and full manual memory management for a hands-on, “closer to the metal” feel. Dive into this new way and discover the wonders of Lox.

Key Features of CoreLox
Bytecode Compilation
Transforms Lox code into bytecode instructions, processed at runtime for swift, efficient execution.
Manual Memory Management
Unlike RustyLox’s automated safety, CoreLox uses manual allocation and resizing for fine-grained performance control.
Constants Pool
Literal values and variables kept in a dedicated array for speedy lookups during runtime.
Streamlined VM
A single-threaded Virtual Machine that handles arithmetic, comparisons, and function calls with minimal overhead.
How Does CoreLox Differ from RustyLox?
While RustyLox embraces Rust’s error handling and concurrency, CoreLox takes a leaner approach, placing memory management in your hands. It's a little riskier but a lot more flexible—and often faster.
With CoreLox, there’s no garbage collector or built-in concurrency model; you decide when and how memory is allocated or freed. Ready to go “closer to the metal”? Dive in.
Getting Started
Want to compile CoreLox from source? Check out the docs for build steps, or head to the Playground for immediate Lox fun. Whether you prefer raw speed or memory safety, we've got you covered.
Ready to hack on CoreLox? Contribute on GitHub, share your improvements, or compare notes with RustyLox. Let's build an even better Lox together!