[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1-5.3 serialization library
- From: Patrick Donnelly <batrick@...>
- Date: Wed, 14 Jan 2015 10:34:29 -0500
Hi Timm,
On Wed, Jan 14, 2015 at 7:51 AM, Timm S. Mueller
<tmueller@schulze-mueller.de> wrote:
> Hi,
>
> before I'm starting to write my own, I'm looking for a serialization
> and deserialization library. Requirements:
>
> - must cover Lua 5.1, 5.2, 5.3 and LuaJIT
> - in the MIT/BSD/CC/PD license department
> - must cover cyclic references and binary data
> - preferrably written in C for performance, Lua would be fine also
> - should only use official Lua APIs, no outside dependencies, no state
> internals
> - The transport format should be legal Lua, but this isn't strictly a
> requirement and may be sacrificed if the result can be transported,
> preferrably also between different architectures and Lua versions. I'm
> not objecting to using JSON format either.
I just uploaded a serialization library [1] I wrote a few years ago
for an IRC bot. It's pure Lua and handles all of your requirements,
except perhaps 5.2, 5.3, and LuaJIT. I haven't tested on those
platforms. The output is Lua code.
> Not required: Userdata, metatables, functions and upvalues. A small
> footprint and the ability to operate on a writer/readers would be nice.
> Any ideas, recommendations?
It also completely handles metatables and Lua functions with shared upvalues.
[1] https://github.com/batrick/lua-serialize
--
Patrick Donnelly