[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] twoface: a Lua 5.1 style ABI on top of lua52.dll
- From: Paul K <paulclinger@...>
- Date: Sat, 20 Jul 2013 16:48:45 -0700
>> One question. is something like this possible for OSX and Linux
>> platforms as well?
> It is not possible on Linux because upstream a) has no official support for shared libraries,
> and b) as Peter alludes to, upstream's unofficial choices for module linkage require a flat
> namespace. Linux certainly supports non-flat namespaces these days, but I don't feel like
Yes, I saw Peter's comment, but I'm not familiar with the terminology
("non-flat namespaces") to figure out what the implications are and
quick google search didn't turn much relevant information.
As far as I understand, it implies that it works on Windows only
because one library (for examples, luasocket) is linked against
lua51.dll and that library can handle some calls and proxy the rest to
lua52.dll. "flat namespace" on Linux means that it simply finds a
symbol without limiting the search to a particular dynamic library
(this is all based on my very limited understanding).
> reading the linker docs again when it's going to require rocket surgery on every loadable
> module object file, or giving in and relinking instead.
True, but it's not just a question of re-linking. It's certainly
possible to compile libraries for Lua 5.2, but it means that for an
IDE to support various engines it either needs to include libraries
compiled for each engine or have a separate installation for each
engine (both options have size/maintenance downsides).
It's very convenient to have LuaJIT as a drop-in replacement for Lua
5.1 with all modules continuing to work. Maybe it's possible to
combine Lua 5.2 with twoface as one library, which will effectively
produce Lua5.2 library with Lua5.1 ABI interface; at least this would
work for me as a drop-in replacement to get Lua5.2 running. The main
downside of this solution is that it's not possible to mix 5.2 and 5.1
modules (as it's currently possible with twoface).
(I'm mostly thinking out loud exploring my options to support multiple
Lua engines and looking for feedback...)