Comprehensive Windows framework to develop in Lua

Lua compatibility

Luart is 100% compatible with the latest Lua programming language version (actually Lua 5.4.1) : Lua programs written for Lua 5.4.1 will therefore run without compatibility issues. Binary modules written for Lua 5.4 are compatible too. But the reverse is not true, as Luart adds more fonctionnalities to Lua : utf8 strings, error reporting, specific runtime library, and the concept of Objects. Please be aware of the following enhancements provided by Luart that may affect compatibility.

UTF8 strings

Standard Lua strings are not true strings : they are containers. They contain bytes and not characters. Lua has no idea of what kind of data is in a string : it can be a picture, a compressed buffer, or any data in memory. That permits to manipulate any kind of data with Lua strings. Everything is ok when your are dealing with standard ASCII characters (one character = one byte). But the day you decide to use multibytes encoded characters (one character = one or several bytes), standard Lua strings functions cannot (and should not) be used. Then came to the rescue the "utf8" module since Lua 5.3. But it adds a level of complexity (as using utf8.offset to convert the character position to a byte position) for end users that just want to use strings for what they are in other programming language : a container for characters. In Luart strings are containers for characters, using UTF8 encoding format (compatible with ASCII). Contrary to standard Lua, all the Luart string library functions are working with UTF8 encoded strings out of the box without the need to use the "utf8" module : string.find, string.gsub, string.gmatch, string.byte… You can still use Luart strings to contain raw bytes, but you should not use strings functions, as they are expecting UTF8 encoded characters.
If you need to use binary data in Luart, you should use a Buffer instead of strings because they are treated as UTF8 encoded strings (one char can be encoded by more than one byte).

Error reporting

Luart is less talkative in case of error during execution: it shows the error message, the file and line where the error occured, without any traceback. The message is displayed in a window for Desktop programs, or in the console, before termination.

Lua standard library

Luart is not fully compatible with the Lua Standard Library, some libraries are not included :

Lua standard modules

Luart modules

base included (enhanced)
coroutine included
package included
string included (enhanced)
utf8 not available
table included
math included
io not available
os not available
debug included
Please be aware that some Lua programs or binary modules may depend on Lua standard modules not available in Luart. These modules are not compatible with Luart
   Previous: Luart installation Next: Luart type system