A fast LibYAML binding for Lua with high-level YAML↔Lua table conversion and low-level event parsing.
LYAML is a binding between the LibYAML C library and Lua that enables high-performance YAML 1.1 parsing and generation. It provides both simple conversion between YAML documents and Lua tables, and low-level access to YAML token and event streams for advanced use cases.
Lua developers who need to read, write, or process YAML configuration files, data serialization formats, or complex document structures within Lua applications.
Developers choose LYAML for its fast C-based implementation, dual high-level and low-level API design, and faithful handling of YAML 1.1 semantics including proper null value preservation and multiple document support.
LibYAML binding for Lua.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses LibYAML's C implementation for fast parsing and serialization, making it ideal for large YAML files or high-throughput Lua applications, as emphasized in the README's philosophy.
Offers both simple load/dump functions for common tasks and low-level event/token parsers for custom YAML processing, detailed in the README with examples for each approach.
Preserves YAML null values as lyaml.null() by default, with options to map to nil, addressing a key semantic gap between YAML and Lua tables as explained in the nil values section.
Handles streams with multiple YAML documents in a single operation via the 'all' option in load and dump, useful for batch processing or complex data serialization.
Does not support YAML 1.2, the current standard with features like omap and improved binary data handling, which may cause compatibility issues with modern YAML files.
Requires LibYAML and LuaRocks or manual compilation with build scripts, making deployment more involved than pure Lua modules, as noted in the Installation section.
The low-level APIs expose LibYAML's event and token models, requiring deep understanding of YAML internals; the README admits implementing 'Compose' and 'Construct' is 'left as an exercise for the reader'.