|
Warning
|
This project is very much in an alpha stage and should not yet be used in production code |
A slow, not yet fully functioning implementation of Lua 5.1
To build Zua, first cd to the cmdline directory under this folder. Then, run dub build -b release. This will build the Zua command-line utility in release mode. Run ./zua --help for usage.
-
✓
coroutinelibrary -
✓
mathlibrary -
✓
tablelibrary -
❏
iolibrary -
❏
debuglibrary (maybe diverge from Lua 5.1) -
❏ Pattern-matching functions in
stringlibrary -
❏ Module system (
require,module, andpackageglobals) -
✓ Add userdata type
-
✓
newproxyfunction
Zua does make some decisions about where to deliberately diverge from Lua 5.1. Here is a comperehensive list of where this is done:
-
There is no such thing as the "main thread." All code, even toplevel code, runs in a coroutine.
-
There is no arbitrary compilation at runtime. This means the globals
dofile,load,loadfile, andloadstringare not available. -
The
string.dump(and consequently("").dump) methods are not available; what use were they, anyway? -
Errors do not include line numbers (but the stack trace outputted in the event of an error still does)
-
The second argument to the
errorfunction is ignored. -
Error messages may differ from Lua 5.1, particularly in parsing.
Any inconsistency between Lua 5.1 and Zua that is not listed above should be regarded as a bug and filed as an issue.