Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

The core class of LuaD, representing a Lua state. When indexed like a table, the global table is being indexed.

When created with no arguments, a new underlying Lua state is created. You can pass a boolean argument to override whether or not the default libraries should be opened. The underlying Lua state is closed in the objects destructor.

When created with a lua_State* argument, the object wraps around the specified Lua state, and the actual Lua state is never closed by this object.