LuaModule

Generate module entry point for use by Lua's require function.

template LuaModule (
string modname
alias initFunc
) {}

Members

Manifest constants

LuaModule
enum LuaModule;
Undocumented in source.

Parameters

modname

module name. Typically this should be the same as the name of the shared library containing this module. Only characters in the set [a-zA-Z_] are allowed. Underscores are used to denote a submodule. The module name must be unique for the current executable.

initFunc

module initialization function. Called when the module is loaded. Its return value is returned by require on the Lua side. Its first parameter must be of type $(DPREF state,LuaState), which is the state of the calling environment. Optionally, there may be a second parameter implicitly convertible to the type const(char[]), which is the name of the module to be loaded (useful for submodules).

Meta