https://github.com/losfair/luax
A Lua 5.3 implementation in Rust (work in progress)
https://github.com/losfair/luax
interpreter lua programming-language rust vm
Last synced: 10 months ago
JSON representation
A Lua 5.3 implementation in Rust (work in progress)
- Host: GitHub
- URL: https://github.com/losfair/luax
- Owner: losfair
- Created: 2018-02-09T17:34:19.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T17:52:01.000Z (over 3 years ago)
- Last Synced: 2025-04-12T22:45:45.208Z (10 months ago)
- Topics: interpreter, lua, programming-language, rust, vm
- Language: Rust
- Size: 29.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# luax
A pure-Rust implementation of Lua. (work in progress)
Built on top of [Hexagon VM](https://github.com/losfair/hexagon).
### Build & Run
Latest nightly version of Rust is needed.
`git clone` both this repository and [luax-bin](https://github.com/losfair/luax-bin) into **the same directory** e.g. `some_directory/luax` and `some_directory/luax-bin`.
Run `cargo build --release` in `luax-bin`. The binary will be at `luax-bin/target/release/luax-bin`.
Currently, luax doesn't include a built-in Lua parser. Instead, it takes an AST file generated by `parser/parse.lua` and `parser/transform.py`, which depend on Python 3, official Lua 5.1, `lua-parser` and `lua-cjson`. See `parser/generate.sh` as an example of how to generate the AST file.
While this project's goal is to support the full Lua language, only basic features are supported at the moment. See `tests/` for things that work.