https://github.com/princemuel/lox
An interpreter for the Lox programming language - implemented in Rust
https://github.com/princemuel/lox
compiler-design compilers crafting-interpreters crafting-interpreters-book interpreters lox-language rust virtual-machine
Last synced: about 1 month ago
JSON representation
An interpreter for the Lox programming language - implemented in Rust
- Host: GitHub
- URL: https://github.com/princemuel/lox
- Owner: princemuel
- Created: 2024-10-04T22:00:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-02T18:19:55.000Z (7 months ago)
- Last Synced: 2026-02-14T19:48:13.919Z (5 months ago)
- Topics: compiler-design, compilers, crafting-interpreters, crafting-interpreters-book, interpreters, lox-language, rust, virtual-machine
- Language: Just
- Homepage: https://craftinginterpreters.com
- Size: 134 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lox
[](https://app.codecrafters.io/users/codecrafters-bot?r=2qF)
This is the Rust implementation of an intepreter for the Lox programming language.
Lox, is a full-featured, efficient scripting language from Robert Nystrom's book, ["Crafting Interpreters"][crafting-interpreters]. lox compiles Lox source code into a bytecode format that is executed by a portable virtual machine.
A more complete description of the features of Lox can be found [here][the-lox-language]
**Note**: If you're viewing this repo on GitHub, head over to
[codecrafters.io](https://codecrafters.io) to try the challenge, or just read [the book][crafting-interpreters] 😀 Along the way, you'll learn about tokenization, ASTs,
tree-walk interpreters and much more.
[crafting-interpreters]: https://craftinginterpreters.com/
[the-lox-language]: https://craftinginterpreters.com/the-lox-language.html
## Setup
1. Ensure you have `cargo (1.88+)` installed locally
2. Run `./program.sh` to run the program, which is implemented in `src/main.rs`.
This command compiles the Rust project, so it might be slow the first time you run it. Subsequent runs will be fast.