Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Luna

Build Status Coverage Status

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 (luajit -b is used to generate the bytecode).

To run the tests::

$ py.test

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

TODO

  • Compiler in Rpython
  • Interators
  • JIT
  • more standard library functions

Features

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:

  • Builtins
  • assert
  • print
  • loadfile
  • loadstring
  • tonumber
  • type
  • math
  • floor
  • sin
  • mod
  • table
  • concat
  • insert
  • remove
  • string
  • find
  • match
  • gsub

About

A luajit bytecode interpreter written in RPython

Resources

License

You can’t perform that action at this time.