Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Lua Shell Makefile

string: objects all provide __pickle metamethod.

* specs/container_spec.yaml, specs/list_spec.yaml,
specs/object_spec.yaml, specs/set_spec.yaml,
specs/strbuf_spec.yaml, specs/tree_spec.yaml,
specs/tuple_spec.yaml: Specify correct behaviours when pickling
these objects, and examples of roundtripping a pickled object
back to an equivalent Lua object.
* lib/std/container.lua (prototype.__module): Name of the module
that can construct this object.
(prototype:__call): Manage __module and __type metafields when
cloning from this one, taking care to support both old style
`_type = "Name"` objects, and new style `__type = "module.Name"`
objects.
(prototype:__pickle): Use a `require` statement with the object
`_module` metafield string when available for a self-contained
pickle format, or fall back to `_type` call for objects that have
not been updated yet.
* lib/std/set.lua (prototype._type): Prepend 'std.list' module
path.
(prototype:__pickle): Similar old/new pickle string output, with
sorted unique elements.
* lib/std/list.lua (prototype._type): Prepend module path string.
* lib/std/object.lua, lib/std/strbuf.lua, lib/std/tree.lua,
lib/std/tuple.lua (prototype._type): Likewise.
* lib/std/tuple.lua (prototype:__pickle): Old/new pickle string
again, but using parentheses instead of braces to match read
syntax of a Tuple object constructor.
* NEWS.md (New features): Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
latest commit 08dd3d75ec
@gvvaughan gvvaughan authored

README.md

Standard Lua libraries

by the stdlib project

License travis-ci status Stories in Ready

This is a collection of Lua libraries for Lua 5.1, 5.2 and 5.3. The libraries are copyright by their authors 2000-2015 (see the AUTHORS file for details), and released under the MIT license (the same license as Lua itself). There is no warranty.

Stdlib has no prerequisites beyond a standard Lua system.

Installation

The simplest way to install stdlib is with LuaRocks. To install the latest release (recommended):

luarocks install stdlib

To install current git master (for testing):

luarocks install https://raw.githubusercontent.com/lua-stdlib/lua-stdlib/release/stdlib-git-1.rockspec

To install without LuaRocks, check out the sources from the repository, and then run the following commands: the dependencies are listed in the dependencies entry of the file stdlib-rockspec.lua. You will also need autoconf and automake.

cd lua-stdlib
autoreconf --force --version --install
./configure --prefix=INSTALLATION-ROOT-DIRECTORY
make all check install

See INSTALL for instructions for configure.

Use

As well as requiring individual libraries, you can load the standard set with

require "std"

Modules not in the standard set may be removed from future versions of stdlib.

Documentation

The libraries are documented in LDoc. Pre-built HTML files are included in the release.

Bug reports and code contributions

These libraries are written and maintained by their users. Please make bug report and suggestions on GitHub (see URL at top of file). Pull requests are especially appreciated.

Something went wrong with that request. Please try again.