lua-users home
lua-l archive

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


I wrote some glue code as a foundation for my personal Lua libraries,
that presented a union of the Lua 5.1 and 5.2 APIs. That is, backported
as much as feasible to Lua 5.1, and the reverse.

I've been using it for a while, but just took some time and cleaned it
up and documented it in case others may find it useful. I hope some
will.

Everything is at: <https://github.com/dubiousjim/luafiveq>

I'd welcome any feedback or suggestions. I haven't had time to keep up
with this list for some months, so I imagine there may be relevant
discussion I've sometimes missed. Of course feel free to point me to it.

Here is the start of the README:


> Lua 5.2 can be compiled with some backwards-compatibility features, and these
> do come enabled by default, but developers cannot *rely* on their being
> enabled in the Luas their end-users have installed. Other things being
> equal, a library author shouldn't have to ask users to recompile Lua with
> specific flags. Also, the backwards-compatibility features Lua provides by
> default are less complete than they might be.
> 
> On the other hand, nearly all of the functionality added to Lua 5.2 is in
> principle available to Lua 5.1, but there is no systematic way to make it
> available.
> 
> The fiveq libraries try to provide a common API base that's mostly the same
> between Lua 5.1 and Lua 5.2. Developers can write against whichever of the two
> APIs they wish, and deploy against either installation of Lua.
> 
> These libraries provide additional features both to Lua and to C. To use the
> Lua features, end users need to first require "fiveq". To use the C
> features, a library packager merely needs to compile against fiveq;
> it does not need to be present on the end-user's system.
> 
> The fiveq*plus* libraries provide a superset of what fiveq does. For
> specific benefits of each, see the files BENEFITS-C and BENEFITS-LUA.


-- 
Jim Pryor
dubiousjim@gmail.com