Specifications

Key features:

An ULua package is a zip file packagename~packageversion.zip containing a single folder packagename.

Module names not consisting exclusively of lowercase alphabetical characters [a-z] are supported only for legacy reasons and should not be used.

The folder packagename is a standard Lua module with additional meta-data. As such ULua packages can be unzipped and used directly with other Lua distributions.

There is a clean separation between module-data and meta-data because all meta-data files and folders start with __. The only required meta-data file is __meta.lua:


return {
  name        = 'packagename',
  version     = 'packageversion',
  require     = { dependency1 = 'version1', dependency2 = 'version2', ... },
  license     = 'type',
  homepage    = 'address',
  description = 'short',
}

Versions follow the semantic versioning format major.minor.patch-pre+build.

Modules are backward-compatible unless major changes (or is 0), incrementing minor signifies the introduction of new functionality and incrementing patch signifies bug-fixes. The pre component is used for pre-releases and the build component is here only supported for legacy reasons and should not be used.

Please refer to semver for the full specifications. Example of valid versions:


2
2.0.4
2.1-20150906
2.1-beta1

Because semantic versioning is used there is no need for complicated dependency rules: for each dependency a single version is specified. The latest compatible version of each dependency is safely selected. The dependency version for luajit must always be specified.

Example of a valid __meta.lua file:


return {
  name        = 'sci',
  version     = '1.0-beta8',
  require     = { luajit = '2.0', xsys = '1.0' },
  license     = 'MIT',
  homepage    = 'http://scilua.org/sci.html',
  description = 'general purpose scientific computing library',
}

The information in __meta.lua is used not only to install, update and remove packages, but also to select the right modules to load by require().

Executable Scripts

Lua command line scripts can be included in ULua packages by storing them into a __bin sub-folder.

Corresponding Windows, OSX and Linux executable scripts will be automatically created in the ulua/bin folder.

A trailing .lua is ignored in the Lua command line script filenames for convenience. For example, both __bin/script and __bin/script.lua would correspond to ulua/bin/script.

C-Lua modules (TODO)

Folders naming conventions result in the loading of the C-Lua module for the correct OS/arch combination.

A mechanism is present to pre-load dynamic libraries required by the C-Lua module.