lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I was under the impression that there was still disagreement on the
GPL and linking, with a good chance that the FSF interpretation is
wishful thinking. A good analogy was that linking is like references
in a literary work. But this is off-topic. :-)

Anyway, C/Invoke does not seem to be actively maintained, I got it to
compile but its tests crash on OSX. I tried to fix the problem but
couldn't figure out the c/invoke internals. In fact that was what
pushed me to write Alien.

Retargeting the callout part to use libffi is trivial, but libffi does
not implement callbacks yet. I can write the callback code for x86,
it's hard but doable, but I have no experience with other platforms.

Fabio Mascarenhas

On Feb 12, 2008 10:53 PM, Bradley Smith <> wrote:
> Fabio Mascarenhas wrote:
> > The first public release of Alien is available (it is 0.3 and not 0.1
> > because I am counting design iterations :-) ).
> >
> > # 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
> > out to native code using just Lua. It uses Bruno Haible's ffcall
> > ( behind the scenes.
> It should be noted that use of alien requires acceptance of the GPL
> license. Although alien lists its license as the MIT license, the ffcall
> library is GPL licensed, which means alien is too.
> Also, note that I am not a lawyer. This is not legal advise.
> An alternative to ffcall is C/Invoke (
> which has a BSD license and preliminary Lua bindings.