LuaDist About LuaDist

About · Install · Use · Dist · Examples · FAQ


What is LuaDist?

LuaDist is a cross-platform distribution of the Lua programming language that includes networked module management and deployment of source based or binary modules. Unlike projects like LuaRocks the main focus of LuaDist is full automatization and standalone deployment including the management of external libraries on the Linux(UNIX), Windows and Mac platforms.

Why?

We simply want an automated way to build and deploy Lua modules and applications without any configuration or system installed parts that actually works.

How does it work?

LuaDist relies on modules packaged as .dist files. These files are common zip archives containing a module directory which can be source or binary. Source modules are CMake built so they ALWAYS contain CMakeLists.txt file, additionally all modules must contain a file named dist.info. This small configuration file informs LuaDist about name, version and what type and architecture the module is and contains additional information about the module.

The structure of source modules is not enforced and the CMakeLists.txt files in most modules can be used to build modules without LuaDist manually. Binary modules are created by packing installed modules so their structure follows the LuaDist deployment structure. Users can create binary packages manually but they must provide a valid dist.info file, this is often useful for distribution of external dependencies.

When installing a module LuaDist collects all available sources of modules into a table, this table is then filtered for modules of the architecture and type the system can install. LuaDist then tries to find the module and version desired by the user to be installed. If source modules are turned on in configuration they will be used as fallback when no binary modules are available. Once a suitable dist is found it will be downloaded, unpacked and its dist.info will provide LuaDist with dependencies. This process is repeated for each dependency. Once all module dependencies have been resolved the module will be installed and in case of the source modules LuaDist will use CMake to compile and install it.

External dependencies are handled as special case of dependency which when unsatisfied will not stop the install process. This can result in three different outcomes. First, the dependency was satisfied and the external dependency was installed by LuaDist correctly. Second, the dependency is not available or the user turned external dependency module repository off but it is available in the host system (eg. libexpat is installed by apt before installing luaexpat). These cases will successfully install the module. The third outcome can occur when the host system does not provide the external dependency and neither does LuaDist. In this case the user can install the module manually into LuaDist or the host system and retry. Or in case of source modules CMake variables can be used to help CMake find the module header and library to build and link against. This approach is beneficial to both users who want to link against system provided modules (most Linux users) and users who want all dependencies to be handled by LuaDist (most Windows/OSX users .. as they have no other real choice).

While installing a module LuaDist creates a documentation index for the module and modifies and moves its dist.info into the module directory so the information about the module is always available. For ease of use LuaDist will generate launch scripts or batch files for binaries or scripts inside the distribution. These scripts setup needed environment variables before launching the applications so LuaDist does not need to install into the host system directly. Additionally this makes Windows users life a little less complicated and ensures LuaDist can be simply redistributed and moved around without any configuration changes.

LuaDist does not modify the behavior of the Lua require or module functionality nor does it modify the Lua and module sources. Therefore only one version of a module can be installed at a time but LuaDist encourages replication so you can use LuaDist to install different set of modules and versions (or different LuaDist version if need be) into a new deployment directory. This behavior can be used for deployment and distribution of Lua based applications.

What else can it do?

What does it not do?


Last update: Sun Dec 21 2008, drahosp

SourceForge