https://github.com/luki446/luir
Lua programming language interpreter written in Rust
https://github.com/luki446/luir
compiler interpreter lua parser rust vm
Last synced: 11 days ago
JSON representation
Lua programming language interpreter written in Rust
- Host: GitHub
- URL: https://github.com/luki446/luir
- Owner: luki446
- License: bsd-3-clause
- Created: 2023-02-17T23:28:08.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T19:39:32.000Z (10 months ago)
- Last Synced: 2025-04-03T20:32:27.728Z (10 months ago)
- Topics: compiler, interpreter, lua, parser, rust, vm
- Language: Rust
- Homepage:
- Size: 60.5 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌙 Luir
## 📚 About
Luir is a Lua programming language interpreter written in Rust. It leverages Rust's performance and safety features to provide a robust and efficient interpreter for Lua scripts.
## ✨ Features
- 🦀 **Rust-Powered:** Utilizes Rust for high performance and safety.
- 📜 **Lua Compatibility:** Fully compatible with Lua syntax and semantics.
- 🔗 **Simple Integration:** Easy to integrate into existing Rust/C projects.
## 🛠️ Getting Started
1. Clone the repository:
```bash
git clone https://github.com/luki446/luir
```
2. Build the project:
```bash
cargo build --release
```
3. Run the interpreter on example Lua scripts:
```bash
cargo run --release -- ./examples/fib.lua
```
4. Install the interpreter locally as drop-in replacement for `lua`:
```bash
cargo install --path .
```
## 📅 Roadmap to v1.0.0
Release v1.0.0 will mark the first stable complete-ish release of Luir. The following features are planned to be implemented before the release:
- [x] Basic Lua expression parsing and lexing.
- [x] Basic Lua statement parsing and lexing.
- [x] Calling native (Rust implemented) functions from Lua.
- [x] If statement.
- [x] Local variable scoping.
- [x] While loop
- [x] For loop.
- [x] Function definitions.
- [x] Comments.
- [x] Repeat-until loop.
- [ ] Tables and pseudo-OOP.
- [ ] Closures support.
- [ ] More standard Lua library functions.
- [ ] REPL mode.
- [ ] Error handling and reporting.
## 📝 License
This project is licensed under the BSD 3-Clause License