Switch branches/tags
Nothing to show
Clone or download
mascarenhas Merge pull request #57 from rrthomas/master
Remove unused m4/ax_with_prog.m4
Latest commit d19b402 Feb 8, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc add instructions on how to get libffi to docs (thanks to Reuben) Mar 21, 2016
m4 Remove unused m4/ax_with_prog.m4 Feb 8, 2018
samples Distribute constants script, and stop make distcheck passing when it … Sep 24, 2012
src Merge pull request #43 from kost/mingw-fix Mar 5, 2015
tests Support Lua 5.3 Feb 27, 2015
.gitignore luarocks: remove manually-generated rockspecs and simplify file layout Jul 13, 2012
Makefile.win windows has ptrdiff_t but not PTRDIFF_MAX, take that into account Sep 21, 2012
Makefile.win64 fix build for windows x64 Sep 3, 2012
README add instructions on how to get libffi to README (thanks to Reuben) Mar 21, 2016
alien.rockspec.in Change release process to upload a rock directly Feb 27, 2015
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
configure.ac Simplify generation of rockspec Feb 27, 2015


Alien - Pure Lua extensions

For more information, see http://mascarenhas.github.com/alien.

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](http://luarocks.org): just do `luarocks install alien`.

Alien is based on libffi. On a GNU/Linux system you should be able to install it with your package manager; 
it is probably called something like `libffi-dev` (Debian, Ubuntu etc.) or `libffi-devel` (Fedora, CentOS etc.). 
If your system's package manager does not have libffi, or you don't have a package manager,
you can get the source code from [the libffi project](http://sources.redhat.com/libffi/).

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:

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

To run some tests:

  make check


Alien is designed and implemented by Fabio Mascarenhas. It uses the
great [libffi](http://sourceware.org/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).