[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.1-5.3 serialization library
- From: Patrick Donnelly <batrick@...>
- Date: Wed, 14 Jan 2015 10:34:29 -0500
On Wed, Jan 14, 2015 at 7:51 AM, Timm S. Mueller
> 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
> - 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  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.