Skip to content

Lua API

Reference for every namespace exposed under the global smelt table. Signatures are derived from the Rust closure's argument tuple and return type, so the LuaCATS-style annotation always matches what mlua actually marshals.

Coverage: 84 namespace(s), 458 function(s), 85 class(es), 11 alias(es).

Functions and namespaces marked Internal are implementation details for bundled Lua. They are documented for transparency, but user config and plugins should prefer public APIs.

IDE completion

Stubs land in runtime/lua/smelt/_meta/ (one file per namespace, plus _types.lua for shared records and aliases). Point lua-language-server at that directory - see runtime/.luarc.json for a working config.

Host namespaces

Available in every runtime, including headless mode.

UiHost namespaces

Requires a terminal UI; calling these from headless mode raises.

Mixed namespaces

Contains both Host and UiHost functions; per-function pages list the exact tier.

Types

  • Classes & aliases - typed opts records and string-literal unions referenced from the namespace pages.