Lua Units is available from a Git repository:

git clone

Before using the module, generate matching FFI C bindings for the udunits2 library using the Lua plugin for GCC and the C declaration composer:


To override the default C compiler gcc, set CC:

make CC=gcc-4.7

If the udunits2 header files are not installed in a system path, set CPATH:

CPATH=/opt/udunits2/include make

To override the name of the udunits2 library, set LIBNAME:


The module is accompanied by a test suite:

make test

To install the module to the default Lua path:

make install