lua-users home
lua-l archive

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


>If I assume that Lua function values are stored as compiled "byte
>code" that is not Lua-state dependent. If I had access to this "byte code"
>buffer and a means of creating Lua function values from the byte code
>buffer, I think could successfully serialize a Lua function value.

I've written a library to access the dump module in luac.
It'll be released with 4.1.

I think that the simplest way to do serialization is to write binary chunks
because code for loading thses is already in place.
But people have written serialization code that outputs Lua code.
Search the lua-l archives for "pickle".
--lhf