Skip to content
A C FFI for Lua
Shell C Lua Perl
Find file
Pull request Compare This branch is 21 commits ahead, 12 commits behind mascarenhas:master.
Latest commit ace5542 Feb 19, 2013 @drahosp drahosp Hand set configure options
Failed to load latest commit information.
build-aux build-aux/ fix a typo Jul 13, 2012
cmake Updated alien lua macros Feb 19, 2013
doc update docs to include link to github project page Oct 19, 2012
m4 bootstrap: no need to call all the autotools manually Jun 14, 2012
samples Merge branch 'master' of git:// into update Feb 19, 2013
src alien.c: fix some casts of AT_char to be unsigned Oct 8, 2012
tests Allow buffers to be zero-length. Sep 29, 2012
.travis.yml Updated travis hook Feb 18, 2013
CMakeLists.txt Hand set configure options Feb 19, 2013 Distribute constants script, and stop make distcheck passing when it … Sep 24, 2012 windows has ptrdiff_t but not PTRDIFF_MAX, take that into account Sep 21, 2012
Makefile.win64 fix build for windows x64 Sep 2, 2012
README README: fix inconsistent whitespace Oct 8, 2012 rockspec: make build_command more robust Sep 26, 2012
bootstrap bootstrap: no need to call all the autotools manually Jun 14, 2012
bootstrap.conf luarocks: remove manually-generated rockspecs and simplify file layout Jul 13, 2012
config.h Hand set configure options Feb 19, 2013 Bump version to 0.7.0, and add change history. Sep 24, 2012 Updated to 0.7.0 Feb 19, 2013


Alien - Pure Lua extensions

For more information, see

What is 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.

Alien works on Unix-based systems and Windows. It has been tested on
Linux/x86, Linux/x64, Linux/ARM, FreeBSD/x86, Windows/x86, OS X/x86,
and OS X/PPC.

The Windows binary uses MSVCR80.DLL for compatibility with LuaBinaries.

Installing Alien

The best way to install Alien is through
[LuaRocks]( just do `luarocks install alien`.

Alien uses the GNU build system. For detailed instructions, see
INSTALL. For a quick start:

[If using git sources:


  ./configure && make [&& make install]

You may need to supply non-default paths (e.g. if you are using a
system that supports more than one version of Lua):

For example, on Debian or Ubuntu:

  CPPFLAGS='-I/usr/include/lua5.1' ./configure --libdir=/usr/local/lib/lua/5.1 --datadir=/usr/local/share/lua/5.1 --with-lua-suffix=5.1

To run some tests:

  make check


Alien is designed and implemented by Fabio Mascarenhas. It uses the
great [libffi](
library by Anthony Green (and others) to do the heavy lifting of calling
to and from C. The name was stolen from Common Lisp FFIs.


Alien uses the MIT license (the same as Lua).
Something went wrong with that request. Please try again.