lua-users home
lua-l archive

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


> Actually, that's not as silly as it may sound.  In order to run your code,
> one needs to have already extended their Lua with the bit library that I
> wrote (and that Reuben Thomas later improved).  If we're going to make that
> assumption, then how much more work is it for the programmer to extend their
> Lua with a MD5 routine in C?

This made me think of two useful things:

1. An automatic static library inserter that adds the relevant lines to
lua.c and lualib.h (or whatever) to add a new library to the lua binary
statically.

2. An automatic dynamic library inserter that lets you add a Lua library
compiled up as a shared library at run-time (for some range of dynamic
linking schemes, e.g. those used by Linux, Solaris and Win32). This could be
just a little glue on top of one of the dynamic loading schemes.

It's just that this is such a common operation, and so simple, that it's
worth automating. It could even be combined with LTN 7's idea of packages so
that you could load a library either to the global space or into its own
namespace.

-- 
http://sc3d.org/rrt/ | The only person worth beating is yourself