[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: External modules was Re: Ideas for implementing commercial support for Lua
- From: "Thatcher Ulrich" <tu@...>
- Date: Fri, 15 Nov 2002 14:14:59 -0500
On Nov 15, 2002 at 07:26 +0100, Bj?rn De Meyer wrote:
> Philippe Lhoste wrote:
> > Yes, Lua must still be available as Ansi C source code and small binaries.
> > We should never have to strip down Lua to get small binary, but instead be
> > able to download various extensions, perhaps as a whole package if needed.
> > If someday we devise a standard way to extend Lua as scripting language,
> > using external modules, it would be a great improvement.
> This is the key feature that Lua should aquire. An advanced
> system by wich available C libraries can be easily integrated,
> without recompiling.
Actually, several such systems exist; the problem is there's no
officially-blessed standard. I think the most Lua-like approach to
this is Ignacio Casta.o's luselib (but I can never find the URL when I
look for it! ):
Anyway, we've gone over this before. My summary: some users
(especially embedded developers) thought that including a DLL loader
in the Lua distribution would be the thin edge of the wedge towards a
bloated distro, and objected; others (including me) thought it would
help extend Lua without bloating; the result was that Lua authors
added the LUA_USERCONFIG and lua_userinit hooks to lua.c in 5.0-alpha.
MHO is that lua_userinit is nice, but I'd like to see luselib.c
somewhere in the distro as well (not enabled by default), so that at
least there is a baseline official implementation, and people can
distribute shared-library binaries with some confidence.
> Hmmm... perhaps it could be posible to
> make a single "libluaproxy" that uses Lua scripts as a description
> language for the functions that are to be called, and works
> as a go-in-between between Lua and regular C functions.
> It could work a bit like the "Declare function" statements
> in Visual Basic.
That could be cool; I think though that the bare minimum (and
therefore most likely to be acceptable to the Lua community) is
something like luselib, which provides a very simple API to
specifically-designed C-language shared libraries.