lua-users home
lua-l archive

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


Daniel Silverstone wrote:

> When writing their own lua interpreters, people tend to end
> up linking statically, you can now link against lua dynamically
> and gain all the size benefits when you have lots of different
> lua interpreters lying around.

So the binary package includes the headers and library?  I thought something
like that belongs in a -dev package?

Anyway, especially with 4.1, there are several configuration options
implemented with compile-time macros.  This limits the usefulness of
pre-built libraries (both static and dynamic), and will lead to confusion
when an app tries to use options that were different than used to compile
the library.  As Lua becomes more configurable in the future, this will only
get worse.  Lua places priority on time and space efficiency so I'd imagine
that low-level options will always be configured at compile-time.

Why dynamic link when Lua is so tiny?  I'd even go beyond recommending
static linking to a pre-built library, and say just include the library
source code in your project.  Besides eliminating the compile-time
configuration issue, it has the advantage of isolating your app from future
Lua changes.  Ten years from now your app could still be using Lua 4.1
because it does everything you need, regardless of the versions active in
Debian.

-John