lua-users home
lua-l archive

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

I've read several times about why DLL-s can't be in default lua. But as
long as there is no standard for dll usage defined by authors I don't
think that it will be usable at all[1].

I believe authors should define some basic features of such dll system,
write their name all over this, and place it on site as document
for implementors.

loadlib() as an option in lua-5.0-alpha is a step in right direction, but
there are still some things missing.

Right now I've got just some thoughts about such a standard or

1. Standard for file naming conventions, such as or for library loaded by

use "NAME"

2. Standard name of lua initialisation function[2] in dll, such as
lua_init(), or lua_NAME_init()

3. loadlib() could use LUA_PATH and fallback to native DLL search path
as a last resort. This would solve the problem from 1. as a side effect.

4. As 1. suggests, I would be more than happy if proposed package system
could use loadlib() if it is compiled into lua. I think that unified
package system which doesn't force user to check if the library is
in lua or nativelly compiled for this platform is the way to go.

And I think that it really should be done in 5.0 final. Otherwise it
will be years before it finally gets defined.


[1] it will be like it is now -- several mutually incompatible dll systems
[2] i.e. the second argument to loadlib()

Bastard Operator From