SLF

SLF
Login

SLF, which stands for Simple Lua Format, aims to be a human readable serialization format and implementation for what I call the Lua data model: tables and values that can build directed graphs, DAGs1, trees, lists, etc.

The format doesn't aim to be a standard, but it aims to be portable and durable.

The format is designed to be used as an immutable file format2 and is mostly about the storage of small and precious data.

My concrete use cases leading to the creation of this project are the storage of Lua data in a Fossil repository, in a LÖVE archive (.love) or in a game's save file.

Principles and Constraints:

Although the format is human readable and can be directly modified with an editor, it is first and foremost a serialization format and not something designed to be edited manually. The human readability aspect is mostly about helping with the inspection of the data and its changes, and to increase its resilience.

This module aims to be a fundamental component of my methodology, which lies in the context of video game creation. Contrary to other methodologies where it could be considered harmful to have the application's data bound to a specific programming language (in that case I would use SQL/SQLite), I consider Lua as fundamental to mine. The Lua data model can be represented by human readable Lua sources, in memory by a Lua state or by this project's format.

Format Specification

The format must be backwards compatible and should be frozen.

Forbidden Ideas

This section is about ideas that should never be done.


  1. ^ Directed Acyclic Graphs
  2. ^ Files that are not modified in-place, unlike a SQLite database.