Start
Version 4 (Josh Jensen, 01/28/2011 04:07 pm)
| 1 | 3 | Josh Jensen | h1. LuaPlus |
|---|---|---|---|
| 2 | 3 | Josh Jensen | |
| 3 | 2 | Josh Jensen | The source code may be downloaded from the new Git repository: |
| 4 | 2 | Josh Jensen | |
| 5 | 4 | Josh Jensen | <pre> |
| 6 | 1 | git clone git://github.com/jjensen/luaplus51-all.git |
|
| 7 | 4 | Josh Jensen | </pre> |
| 8 | 1 | ||
| 9 | 1 | ||
| 10 | 3 | Josh Jensen | h2. Building |
| 11 | 3 | Josh Jensen | |
| 12 | 3 | Josh Jensen | # Run the @CreateJamVS2010Workspace.bat@ (or @CreateJamVS2008Workspace.bat@ or @CreateJamXcodeWorkspace.sh@) script in the LuaPlus main directory after putting the @jamplus\bin\win32@ directory in your @PATH@ (or modifying the @CreateJamVS2010Workspace.bat@ script to point to that directory). |
| 13 | 3 | Josh Jensen | # Navigate to @build2010\_workspace.vs2010_\@ and open @LuaPlus.sln@ within Visual Studio 2010. |
| 14 | 3 | Josh Jensen | # Build the solution. |
| 15 | 3 | Josh Jensen | |
| 16 | 3 | Josh Jensen | |
| 17 | 3 | Josh Jensen | h2. What is LuaPlus? |
| 18 | 3 | Josh Jensen | |
| 19 | 3 | Josh Jensen | _The LuaPlus distribution contains some modifications to the core Lua code base. As such, it is not an official distribution of Lua 5.1 (which may be found at http://www.lua.org/), nor does it intend to represent itself as one. Most modifications are superficial, but some, such as the wide character string type, end up touching a great deal of source files. Any references to Lua in this document refer specifically to the modified Lua code contained herein, unless otherwise stated._ |
| 20 | 3 | Josh Jensen | |
| 21 | 1 | The LuaPlus distribution provides the following functionality. |
|
| 22 | 1 | ||
| 23 | 3 | Josh Jensen | * All the power of the core Lua 5.1 work distribution. |
| 24 | 1 | * An optional high performance reference counted garbage collector. |
|
| 25 | 1 | * An easy to use C++ interface: |
|
| 26 | 3 | Josh Jensen | ** The C++ interface, described below, masks many of the intricacies of core Lua's underlying low-level C API. In particular, stack management is mostly ignored. Other useful helper classes, such as management of ref'ed objects or the stack, table traversal, and table lookups are provided, dramatically simplifying the application code. |
| 27 | 3 | Josh Jensen | ** Simplified function calling convention. Inspired by, to a limited degree, Python's use of tuples in its C API, the new function calling convention masks the stack pushing and popping associated with the low-level calling convention. |
| 28 | 3 | Josh Jensen | ** A newly added function calling convention enables C++ to call Lua functions as if they were regular C++ functions. This goes a long way to simplifying Lua for C++ users. |
| 29 | 1 | ** A transparent C++ functor implementation is in place, allowing function callbacks to be global or static (as they are now), class member functions, or class member virtual functions. |
|
| 30 | 3 | Josh Jensen | ** Direct registering of C++ functions with LuaPlus. The registered C++ functions do not need to conform to a standard callback declaration. |
| 31 | 3 | Josh Jensen | ** .NET wrapper. The .NET version of LuaPlus opens up LuaPlus's features to any .NET based language. This includes C#, Visual Basic, Python, Perl, and others. The Managed C++ version of LuaPlus is nearly identical to its regular C++ counterpart, so transitioning is easy. |
| 32 | 3 | Josh Jensen | ** Serialization of Lua tables. Lua is a boon for data management. With a much simpler syntax than XML, while providing equivalent and better data description facilities, a way is needed to write table data in text form. LuaPlus offers this facility, and it does it in such a way that no Lua internal state is changed. |
| 33 | 3 | Josh Jensen | ** Win32 DLL and LIB formats. Through the DLL version, a module plug-in system is in place. |
| 34 | 1 | * Extra Tools: |
|
| 35 | 3 | Josh Jensen | ** Debugger. The Remote Lua Debugger all but eliminates the need to litter print() statements throughout script code. It offers a view of the call stack, local variables, watch variables, syntax highlighting, has Visual C++ debugger style keystrokes, and much more. |
| 36 | 3 | Josh Jensen | ** Visual C++ watch add-in to monitor data types. When manipulating a LuaObject (one of the classes provided by the C++ interface), Visual C++ 6 and Visual Studio .NET show the contents of the LuaObject in the watch window. The LuaWatchAddin makes no distinction between stack objects, ref'ed objects, up-values, or other indices. In addition, if the index being shown is out of range, the LuaWatchAddin represents that. |
| 37 | 3 | Josh Jensen | ** The Visual Studio .NET LuaPlus Debugger plug-in allows display of the Lua tables in tree form, local Lua variables, and the current Lua callstack. Stepping through Lua code in the VS .NET environment is not possible at this time, but the Remote Lua Debugger may still be used. |
| 38 | 1 | * Lua Core Enhancements: |
|
| 39 | 3 | Josh Jensen | ** 16-bit wide character string support. |
| 40 | 3 | Josh Jensen | ** Tight integration of the extra string type was necessarily built into the code base. Any reference to LUA_TSTRING in the Lua core code base was supplemented with an equivalent wide character LUA_TWSTRING. |
| 41 | 3 | Josh Jensen | ** Direct support for opening Unicode files available. |
| 42 | 3 | Josh Jensen | ** Ref'ed objects are treated no differently than a stack object. Rather than dealing with low-level lua_getref() calls everywhere to load the ref'ed object onto the stack, the user can just "use" the object. No special management is needed. |
| 43 | 3 | Josh Jensen | ** Custom memory allocators and memory optimization support. For those working in embedded environments, better control over memory allocation is a must. |