[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: DLLs
- From: "Robert R. Wal" <rrw@...>
- Date: Mon, 2 Sep 2002 17:55:56 +0200
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 lua.org 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
implementation.
1. Standard for file naming conventions, such as libNAME.so/NAME.dll or
libluaNAME.so/luaNAME.dll 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.
Robert
[1] it will be like it is now -- several mutually incompatible dll systems
[2] i.e. the second argument to loadlib()
--
Bastard Operator From 149.156.96.35