Skip to main content

Prebuilt Libraries

XXTouch Elite fully supports the Lua programming interface. You can download and install extension libraries from LuaRocks and port them to XXTouch Elite for use.

note

You can also refer to the following template to write your own extension libraries.
Extension_Template.zip (1.9 MB)

Open-Source Credits

/usr/local/xxtouch/lib/ contains many precompiled third-party open-source Lua extension libraries.
You can find related copyright information and more details on their official websites or open-source repository pages.

lua-zip

lua-cjson

Copas

Copas is a dispatcher based on coroutines that can be used for asynchronous networking. For example TCP or UDP based servers. But it also features timers and client support for http(s), ftp and smtp requests.

croissant

A Lua REPL and debugger implemented in Lua.

Lua-cURLv3

hump

hump is a small collection of tools for developing games with LÖVE.

lua-llthreads2

A simple Lua wrapper for pthreads & WIN32 threads.

Each thread gets it’s own lua_State and there is no shared global state. The parent thread can pass data to a child thread only as parameters when creating the child thread. The child threads can return data back to the parent thread only when it return (i.e. ends). The parent needs to call child:join() to get the return values from a child thread, this call will block until the child thread ends.

The design goals of this module is only provide support for creating new lua_State and running them in a different thread. This module will not provide any methods of thread-to-thread data passing between running threads (i.e. no locks, no shared state).

lua-lluv

Lua low level binding to libuv.

libuv is a multi-platform support library with a focus on asynchronous I/O. It was primarily developed for use by Node.js, but it’s also used by Luvit, Julia, uvloop, and others.

lua-lluv-ssl

SSL/TLS sockets for lua-lluv library.

lua-lluv-websocket

This library includes stream interface for lua-lluv and lua-lluv backend for lua-websockets.

lua-lluv-ftp

FTP client for lua-lluv library.

lua-lluv-poll-zmq

ZMQ poller for lua-lluv library.

lua-lluv-curl

Make asyncronus requests using libuv and libcurl.

This module provide async version of curl multi class. Also module implement async request queue class which allows control number of parallel requests.

lua-log

lzmq

Lua binding to ZeroMQ library.

luasocket

LuaSocket is a Lua extension library composed of two parts:

  1. a set of C modules that provide support for the TCP and UDP transport layers, and
  2. a set of Lua modules that provide functions commonly needed by applications that deal with the Internet.

neturl

A Robust URL Parser and Builder for Lua.

This small Lua library provides a few functions to parse URL with querystring and build new URL easily.

lua-path

lua-pop3

POP3 client library for Lua 5.1 / 5.2 / 5.3.

luaposix

This is a POSIX binding for LuaJIT, Lua 5.1, 5.2, 5.3 and 5.4; like most libraries it simply binds to C APIs on the underlying system, so it won’t work on non-POSIX systems. However, it does try to detect the level of POSIX conformance of the underlying system and bind only available APIs.

sirocco

A collection of interactive command line prompts for Lua.

LuaSec

LuaSec depends on OpenSSL, and integrates with LuaSocket to make it easy to add secure connections to any Lua applications or scripts.

lua-term

lua-term is a Lua module for manipulating a terminal.

lua-tui

A library for doing things with terminals.

lua-wcwidth

When writing output to a fixed-width output system (such as a terminal), the displayed length of a string does not always match the number of characters (also known as runes, or code points) contained by the string. Some characters occupy two spaces (full-wide characters), and others occupy none.

POSIX.1-2001 and POSIX.1-2008 specify the wcwidth(3) function which can be used to know how many spaces (or cells) must be used to display a Unicode code point. This Lua contains a portable and standalone implementation based on the Unicode Standard release files.

This module is useful mainly for implementing programs which must produce output to terminals, while handling proper alignment for double-width and zero-width Unicode code points.

Alien

Alien is a Foreign Function Interface (FFI) for Lua. An FFI lets you call functions in dynamic libraries (.so, .dylib, .dll, etc.) from Lua code without having to write, compile and link a C binding from the library to Lua. In other words, it lets you write extensions that call native code using just Lua.

ansicolors.lua

ansicolors is a simple Lua function for printing to the console in color.

argparse

Argparse is a feature-rich command line parser for Lua inspired by argparse for Python.

Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help and error messages.

lbase64

Pure Lua base64 encoder/decoder. Works with Lua 5.1+ and LuaJIT. Fallbacks to pure Lua bit operations if bit/bit32/native bit operators are not available.

binaryheap.lua

Binary heap implementation.

LuaDate

Lua Date and Time module for Lua 5.x.

lua-ftp

Simple wrapper around LuaSocket ftp.

imap4.lua

Simple IMAP4 protocol wrapper, based on RFC3501.

LuaPanda

LuaUnit

LuaUnit is a popular unit-testing framework for Lua, with an interface typical of xUnit libraries (Python unittest, Junit, NUnit, ...). It supports several output formats (Text, TAP, JUnit, ...) to be used directly or work with Continuous Integration platforms (Jenkins, Hudson, ...).

LuaUnit may be installed as a rock or directly added to your project. For simplicity, LuaUnit is contained into a single-file and has no external dependency.

Tutorial and reference documentation is available on read-the-docs.

LuaUnit may also be used as an assertion library, to validate assertions inside a running program. In addition, it provides a pretty stringifier which converts any type into a nicely formatted string (including complex nested or recursive tables).

LuaXML

LuaXML provides a minimal set of functions for the processing of XML data in Lua. It offers a very simple and natural mapping between the XML data format and Lua tables, which allows one to parse XML data just using Lua’s normal table access and iteration methods: Substatements and text content is represented as array data having numerical keys, attributes and tags use string keys. This representation makes sure that the structure of XML data is exactly preserved in a read/write cycle.

Since version 1.7, LuaXML consists of a well-optimized portable ISO-standard C file and a small Lua file. It is published under the same liberal licensing conditions as Lua itself (see below). It has been successfully compiled and used under Linux, various flavours of MS Windows, and Mac OS X.

lua-protobuf

This project offers a C module for Lua (5.1, 5.2, 5.3, 5.4 and LuaJIT) manipulating Google’s protobuf protocol, both for version 2 and 3 syntax and semantics. It splits to the lower-level and the high-level parts for different goals.

For converting between binary protobuf data with Lua tables, using pb.load() loads the compiled protobuf schema content (*.pb file) generated by Google protobuf’s compiler named protoc and call pb.encode()/pb.decode().

Or use these modules to manipulate the raw wire format in lower-level way:

  • pb.slice: a wire format decoding module.
  • pb.buffer: a buffer implement that use to encode basic types into protobuf’s wire format. It can be used to support streaming decode protobuf data.
  • pb.conv: a module converting integers in the protobuf wire format.
  • pb.io: a module access stdin/stdout or other files in binary mode.

If you don’t want to depend Google’s protobuf compiler, protoc.lua is a pure Lua module translating text-based protobuf schema content into the *.pb binary format.

LPeg

LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). This text is a reference manual for the library. For a more formal treatment of LPeg, as well as some discussion about its implementation, see A Text Pattern-Matching Tool based on Parsing Expression Grammars. (You may also be interested in my talk about LPeg given at the III Lua Workshop.)

lua-sendmail

Simple wrapper around LuaSocket smtp.send.

Serpent

Lua serializer and pretty printer.

Lua-Split

timerwheel.lua

Efficient timer for timeout related timers: fast insertion, deletion, and execution (all as O(1) implemented), but with lesser precision.

This module will not provide the timer/runloop itself. Use your own runloop and call wheel:step to check and execute timers.

lua-iconv

Lua-iconv is POSIX iconv binding for the Lua Programming Language. The iconv library converts a sequence of characters from one codeset into a sequence of corresponding characters in another codeset. The codesets are those specified in the iconv.new() call that returned the conversion descriptor, cd.

lua-utf8-simple

LuaSQLite3

lua-archive

Lua 5.1 interface to libarchive.

lua-ev

lua-http-parser

Lua 5.1 interface to ry’s http-parser.

lua-openssl

A free, MIT-licensed OpenSSL binding for Lua.

lua-spawn

A lua library to spawn programs.

lua-vararg

vararg is a Lua library for manipulation of variable arguements (vararg) of functions. These functions basically allow you to do things with vararg that cannot be efficiently done in pure Lua but can be easily done through the C API.

Actually, the main motivation for this library was the 'pack' function, which is an elegant alternative for the possible new standard function ’table.pack' and the praised 'apairs'. Also 'pack' allows an interesting implementaiton of tuples in pure Lua.

lua-zlib

Lua 5.1 interface to zlib.

luafilesystem

LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution.

LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. LuaFileSystem is free software and uses the same license as Lua 5.x (MIT).

lunix

lunix is a Lua bindings library module to common Unix system APIs. The module is regularly tested on recent versions of AIX, FreeBSD, Linux/glibc, Linux/musl, NetBSD, OpenBSD, OS X, and Solaris. The best way to describe it is in contradistinction to luaposix, the most popular bindings module for Unix APIs in Lua.

lua-websockets

Lua IMagick

Pure-C Lua bindings to ImageMagick.

lyaml

LibYAML binding for Lua, with a fast C implementation for converting between %YAML 1.1 and Lua tables, and a low-level YAML event parser for implementing more intricate YAML document loading.

luaexif

luaexif is a Lua binding for libexif. Compatible with Lua 5.1 or later.

inspect.lua

This library transforms any Lua value into a human-readable representation. It is especially useful for debugging errors in tables.

The objective here is human understanding (i.e. for debugging), not serialization or compactness.