lua-users home
lua-l archive

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


> 2. In the lua scripts run through that interpreter, they'd say "load
> my_extensions.so" (or something like that), dynamically linking to the
> functions etc. resources within the ".so".
> 
> This isn't possible with the current implementation, right?
> 
> If I do extensions, I have to complain the full lua engine into the app as
> well. This might lead to situations where there are several engines
> (probably of different version) on a system at once, each for a separate
> task and with its own extensions. Somehow, I feel more at home if I had one
> language engine and "libraries" (althoug implemented in C) for that.
> 
> Does anyone share these ideas and has this been discussed already?
	I've made a package with some libraries and a Makefile
that modifies the distributed Lua interpreter to add the capability
of loading dynamic libraries.  I've only tested it on Linux, but I
think it runs on any Unix...
	I've been using it for exactly what you want: scripts
that need some C libraries loaded dynamically.  The package includes
LuaSQL, LuaSocket, MD5 and Poslib.  I can send you a copy if you ask me.
	On the other hand I don't know exactly if the method I've
implemented will be compatible with the method adopted in the new
version 5.0.  So, maybe you would prefer to wait for it.

	Tomas