rlox
is a Rust implementation of the Lox programming language, as described in the book Crafting Interpreters. It includes a REPL (Read-Eval-Print Loop) and the ability to execute Lox scripts.
- A fully functional Lox interpreter written in Rust.
- Support for both interactive REPL and script execution.
- Implements the Lox language as described in Crafting Interpreters.
- Easy to build, run, and test using
cargo
. - Well tested with unit tests and integration tests.
- Will support List and Map
To start the interactive REPL:
./rlox
To execute a Lox script:
./rlox <script>
-
Clone the repository:
git clone https://github.com/WenzeJin/rlox.git cd rlox
-
Build the project:
cargo build --release
-
Run the REPL or a script as described in the Usage section.
To build the project in release mode:
cargo build --release
To build and run the project:
cargo run
Run the test suite using cargo
:
cargo test
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
Note
Copyright (c) 2025 Wenze Jin