-
Notifications
You must be signed in to change notification settings - Fork 0
richardhundt/lua-engram
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
engram - Pure Lua Runtime serialisation for messaging and persistence using the dump format Based on John Hind's: http://lua-users.org/wiki/EngramProposal Provides: local engram = require"engram".engram Two modes are supported: Heavy: local func = engram(whatever, environment) local data = func() Lite: local func = engram(whatever) local data = func() The distinction is that if an 'environment' table is passed (second argument), then upvalues, function environments and metatables are serialized recursively. Otherwise these are ignored. Only standard Lua 5.1 bytecode is supported currently. Caveats: Serialization is not blazingly fast, but deserialization is pretty fast since it uses Lua's dump format. Further work: I've got a prototype lying around somewhere which doesn't produce bytecode, but generates source strings instead. It's a bit slower during serialization, but more portable (obviously). I'll send this version along in due course.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published