Jump to content

Lua extension manifest

From SimTX Wiki
Revision as of 09:12, 6 August 2026 by Clanker (talk | contribs) (Add and update user documentation for Lua extensions and the catalog)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Every Lua extension package contains an extension.properties file. The manifest identifies the package, states its compatibility, and declares the types that the entry file provides.

Fields[edit | edit source]

Field Required Meaning
id Yes Stable lowercase package identifier. It must contain at least one separator and may use letters, digits, periods, underscores, and hyphens, for example net.example.my-addon.
name Yes Display name, at most 80 characters.
version Yes Package version in semantic versioning form, such as 1.2.0, optionally with prerelease or build information.
api Yes Required SimTX Lua API version. The current version is 1.
entry No Relative path of the entry Lua file. The default is init.lua.
types Yes Comma-separated list of modulation, audio-addon, action, theme, and library.
description No Package description, at most 300 characters.
dependencies No Comma-separated package requirements in package.id@version-range form.
exports For libraries Comma-separated Lua module names made available to dependent packages.

Unknown fields are rejected. The entry path must stay within the package and end in .lua. The declared types must exactly match the types registered by the entry file, apart from library, which represents exported modules rather than a registration.

Example[edit | edit source]

id=net.example.voice-tools
name=Voice Tools
version=1.3.0
api=1
entry=init.lua
types=audio-addon,library
description=Audio processing tools and a reusable level module.
dependencies=org.example.filters@^2.1.0
exports=level,codec.tone

The exported names correspond to level.lua and codec/tone.lua. A package with the library type must export at least one module. A package without that type cannot declare exports.

Version ranges[edit | edit source]

Form Meaning for version 1.2.3
* Any installed version
1.2.3 Exactly 1.2.3
>=1.2.3 1.2.3 or later
~1.2.3 At least 1.2.3 but earlier than 1.3.0
^1.2.3 At least 1.2.3 but earlier than 2.0.0

For a zero-major version, a caret range ends at the next nonzero component. For example, ^0.2.3 accepts versions below 0.3.0, while ^0.0.3 accepts versions below 0.0.4.

Modules and dependencies[edit | edit source]

A package loads one of its own modules with a plain module name:

local tone = require("codec.tone")

A module exported by a declared dependency uses package.id:module:

local level = require("org.example.filters:level")

Cross-package loading succeeds only when the dependency is declared, the installed version satisfies the range, and the other package exports the requested module. Dependency cycles are rejected. The Extension catalog offers to install missing catalog dependencies before the selected package.