[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1-5.3 serialization library
- From: "Timm S. Mueller" <tmueller@...>
- Date: Wed, 14 Jan 2015 16:52:33 +0100
On Wed, 14 Jan 2015 13:36:00 -0200
Hisham <h@hisham.hm> wrote:
> On 14 January 2015 at 12:34, Timm S. Mueller
> <tmueller@schulze-mueller.de> wrote:
> > On Wed, 14 Jan 2015 15:08:31 +0100
> > Philipp Janda <siffiejoe@gmx.net> wrote:
> >
> >> Am 14.01.2015 um 13:51 schröbte Timm S. Mueller:
> >> > Hi,
> >>
> >> 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.
> >> >
> >> > 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?
> >> >
> >>
> >> Have you ruled out those[1]?
> >
> > Not all, I'm still working through that list, but I found not a single
> > mention of 5.2, and 5.3 was only recently released. Many entries depend
> > on old versions, do write to a file, miss handling for cyclic
> > references. Eris and Pluto are ruled out for version specificy and
> > looking into state internals. Data Dumper and Serpent are close to my
> > requirements, but there may be others which I am not aware of or
> > achieve the same in C or use JSON as a transport format, for example.
>
> Make sure to let us know the results of your research, and once you
> pick your favorite, mark it as "endorsed" at:
>
> https://lua-toolbox.com/
>
> In the "serialization" tag, Serpent is currently the most endorsed:
>
> https://lua-toolbox.com/label/9
Ok, will do.
I'm through with the list [1].
My current favourites are MessagePack [2] and cmsgpack [3], because
this has the prospect of offering both a pure Lua and a C library, it's
for 5.1 to 5.3, and has excellent support in a wide variety of
languages. Need to get into testing and see if msgpack doesn't impose
unacceptable limits for me to sacrifice the readability of Lua.
[1] http://lua-users.org/wiki/TableSerialization
[2] https://github.com/fperrad/lua-MessagePack/
[3] https://github.com/antirez/lua-cmsgpack
- Timm
--
Timm S. Mueller <tmueller@schulze-mueller.de>
Schulze & Mueller GbR, Jungstr. 2, 10247 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 85610000, http://www.schulze-mueller.de/