Luna is a bytecode register interpreter for Lua. At the moment it uses Luajit to compile Lua files to bytecode and interprets it.
You'll need to have a few dependencies installed. You can get them with
pip install -r requirements.txt. Then make sure you have a recent checkout of
PyPy and have it on your
PYTHONPATH. Finally you need a
recent version of
luajit -b is used to generate
To run the tests::
To translate run::
$ python translate.py
This will compile Luna, it'll take about 30 seconds.
To run Luna directly on top of Python you can do::
$ python -m luna /path/to/file.lua
- Compiler in Rpython
- more standard library functions
At the moment, Luna supports most of the Lua standard constructs, except iterators.
Following parts of the standard library (the code can be found in luna/modules) have been implemented: