1. What is Lua?
2. What is Lua for Windows?
3. What comes with Lua for Windows?
4. Using Lua for Windows.
4.1 Running Lua Programs.
4.2 Editing Lua Programs.
4.3 Debugging Lua Programs.
4.4 Using Lua without command console.
5. Concise Overview of Lua Programming Language.
6. Libraries included with Lua for Windows.
7. Learn more about Lua.
8. Acknowledgments.
Lua for Windows is a 'batteries included environment' for the Lua scripting language on Windows.
Lua for Windows combines Lua binaries, Lua libraries with a Lua-capable editor in a single install package for the Microsoft Windows operating system. Lua for Windows contains everything you need to write, run and debug Lua scripts on Windows. A wide variety of libraries and examples are included that are ready to use with Microsoft Windows. Lua for Windows runs on Windows 2000 and newer versions of Windows. Lua and its associated libraries are also available for other operating systems, so most scripts will be automatically cross-platform.
Lua Interpreter: | Start/Programs/Lua/Lua (Command Line) |
Lua Reference: | Start/Programs/Lua/Documentation/Lua 5.1 Reference Manual. |
Quick Lua Tour: | Start/Programs/Lua/Lua Examples/QuickLuaTour.lua |
Examples: | Start/Programs/Lua/Lua Examples. |
Documents: | Start/Programs/Lua/Documentation. |
Libraries: | See Section 6. Libraries included with Lua for Windows. |
From Explorer double click on .lua file and Lua interpreter will run that .lua file.
From Start/Programs/Lua/SciTE, edit lua script from SciTE press F5 to run.
From explorer or command line use any text editor you wish. Save with .lua file name extension and run as decribed above.
From Start/Programs/Lua/SciTE, use SciTE editor to edit a Lua script.
From Start/Programs/Lua/SciTE , open your Lua script, then
Press ALT-R to starting Debug/Continue,
F9 to toggle breakpoints,
ALT-C to step one line at a time,
ALT-N to step over,
ALT-M to step out,
ALT-K to kill debug session,
ALT-L to show local variables,
ALT-I to inspect variable,
ALT-CTRL-B for stack stack,
ALT-W to watch variable,
ALT-G goto a specific line as debugging.
SciTE also has toolbar buttons for most common debug operations.
To run Lua scripts without a command console use wlua.exe. GUI examples from IUP library have been renamed to *.wlua and run without a console. For example, from Start/Programs/Lua/Lua Examples go to iup\elem\iupmenu directory and double click on iupmenu.wlua to run a GUI app.
Library |
Version |
Description |
Alien |
0.5.0 |
Provides access to functions in an unknown or new .dll. |
IUP |
3.5.0 |
Light Portable Graphical User Interface library. |
CD |
5.4.1 |
Canvas Draw: A platform-independent graphic library. |
IM |
3.6.3 |
A toolkit for Digital Imaging. |
Ex |
Jan 07 |
Adds environment, file system, I/O (Locking and pipes), and process control. |
LPeg |
0.10 |
Pattern-matching library based on Parsing Expression Grammars (PEGs). |
Lua-GD |
2.9.33r2 |
Image manipulation library based on Thomas Boutell’s GD library. |
LuaCOM |
1.4 |
Enable use & implementation of Microsoft’s Component Object Model. |
LuaCURL |
1.0 |
Interface to Internet browsing capabilities based on the cURL library. |
Date |
2 |
Date and Time library for Lua. |
LuaDoc |
3.01 |
Documentation tool for Lua source code. |
LuaExpat |
1.1.0 |
Lua interface to XML Expat parsing library. |
LuaFileSystem |
1.4.2 |
Access the directory structure and file attributes. |
LuaLogging |
1.2.0 |
Logging features in Lua, based on log4j. |
LuaProfiler |
2.0.1 |
Time profiler designed to find bottlenecks in Lua programs. |
LuaSocket |
2.0.2 |
Lua interface to support HTTP,FTP,SMTP, MIME, URL & LTN12. |
LuaSQL |
2.1.1 |
Lua interface for PostgreSQL, ODBC, MySQL, SQLite, Oracle, and ADO dbms. |
LuaUnit |
1.3 |
Testing framework for Lua. |
LuaZip |
1.2.3 |
Read files from zip files. |
stdlib |
21 |
Library of modules for common programming tasks, including list, table and functional operations, regexps, objects, pretty-printing and getopt. |
lrexlib |
2.2 |
Regular expression library for Lua. |
MD5 |
1.1.2 |
Basic cryptographic facilities for Lua. |
Copas |
1.1.5 |
Dispatcher based on coroutines that can be used by TCP/IP servers. |
Coxpcall |
1.13 |
Encapsulates the protected calls with a coroutine based loop, so errors can be dealed without the usual pcall/xpcall issues with coroutines. |
Rings |
1.2.2 |
Provides a way to create new Lua states from within Lua. It also offers a simple way to communicate between the creator (master) and the created (slave) states. |
LOOP |
2.3 Beta |
LOOP stands for Lua Object-Oriented Programming and is a set of packages for supporting different models of object-oriented programming in the Lua language. |
LuaTask |
1.6.4 |
Implements a concurrent and independent Lua execution environment model. |
LuaInterface |
1.5.3 |
Integration between the Lua language and Microsoft .NET platform's Common Language Runtime (CLR). |
wxLua |
2.8.10 |
Lua binding to the wxWidgets library |
lpack |
29 Jun 2007 19:27:20 |
Lua library for packing and unpacking binary data |
VStruct |
1.0.2 |
Provides functions for manipulating binary data |
LuaBitOps |
1.0.1 |
Lua BitOp is a C extension module for Lua 5.1 which adds bitwise operations on numbers. |
LuaXML |
1.3 |
A module that maps between Lua and XML without much ado |
Lanes |
2.0.4 |
Provides the possibility to run multiple Lua states in parallel. |
MetaLua |
0.5-rc1 |
A complete macro system with full compatibility with Lua 5.1 sources and bytecode: clean, elegant semantics and syntax, amazing expressive power, good performances, near-universal portability. |
LuaGL |
1.3 |
It’s a library that provides access to all of the OpenGL functionality from Lua. |
Penlight |
0.9.4 |
Penlight is a set of pure Lua libraries, with only lfs dependency, for extended operations on tables, lists and strings, partially implementing some useful parts of the Python libaries. |
lbase64 |
for Lua 5.1 |
A base64 library for Lua. |
gzio |
0.9.0 |
The Lua gzip file I/O module emulates the standard I/O module, but operates on compressed gzip format files. |
Markdown |
0.32 |
This is an implementation of the popular text markup language Markdown in pure Lua. |
LuaRS232 | 1.0.0 | Lua binding to librs232 which is a cross-platform rs232 (serial) library. |
LeMock | 0.6 |
LeMock (Lua Easy Mock) is a mock creation module intended for use together with a unit test framework such as LuaUnit, lunit or lunity. |
Oil | 0.4-beta |
It is a simple, efficient and flexible object request broker written in the Lua language. |
LuaJSON | 1.2.2 | JSON parser/encoder for Lua Parses JSON using LPEG for speed and flexibility. Depending on parser/encoder options, various values are preserved as best as possible |
Programming in Lua, 2nd Edition by Robert Ierusalimschy.
This book is also referred to as the Blue PIL. The first
edition is free online at http://www.lua.org/pil/.
Lua Reference Manual, by R. Ierusalimschy, L. H. de Figueiredo, W. Celes.
Available online at http://www.lua.org/manual/5.1/.
Beginning Lua Programming by Kurt Jung & Aaron Brown.
Covers many aspects of Lua programming & Lua libraries.