Skip to main content

Glossary (GLOSSARY)

Normative terms follow this table; implementation details are in the “Where implemented” column.

Core architecture

TermMeaningWhere implemented
ZLuaC# ↔ Lua (PUC-Rio 5.1–5.5, etc.) interop framework for Unity; Editor uses Mono, Player uses Il2CppPackages/com.code-philosophy.zlua
Lua-visible semanticsObservable script-side behavior contract; Mono and Il2Cpp must matchspec/**
Dual runtimeZLua.Mono (Editor) + ZLua.Il2Cpp (Player); facade LuaAppDomainspec/00-OVERVIEW.md
libil2cpp/zluaRoot of Player-side native implementationbuild-win64/.../libil2cpp/zlua
GetFunctionC#→Lua: LuaAppDomain.GetFunction<T> binds a Delegate by module and method namespec/01-HOST-API.md
MethodBridgeLua→C# method bridge; Il2Cpp reuses stubs by ReducedType; Mono Emits per memberimpl/codegen/

Types & naming

TermMeaningWhere implemented
CSharp root tableGlobal table; __index lazily loads assembly → typespec/02-TYPE-SYSTEM.md §2
Type table (typeTable)Static facade table from CSharp[assembly][typeFullName]§3.1
typeFullNameCLR full name; . for namespaces; + for nested types§2.3
typeArgArg describing a C# type in zlua APIs: type table / zlua.types.* / mscorlib stringspec/05-LIB.md §3
Facade (view)Declared type exposed by userdata; may differ from runtime concrete typespec/marshal/06-CLASS.md
__typeidType id for closed generics, arrays, etc. that cannot be reverse-looked up from string aloneTypeRegistry
InternSame make_*_type args return the same type table on repeated callsTypeRegistry

Metatables & indexing

TermMeaningWhere implemented
SMTStatic Metatable: static metatable on the type tablespec/metatable/01-LAYOUT.md
IMTInstance Metatable: metatable on instance userdatasame
Three-table indexerDispatch via methodTable / fieldGetterTable / fieldSetterTable (Mono)spec/metatable/02-INDEX.md
Il2Cpp native indexerDispatch* C closures + NameMetaMap (MetaBinding / TypeRegistry)impl/metatable/INDEXER-IL2CPP.md
__index missUnregistered member → returns nil (no reflection fallback)spec/metatable/02-INDEX.md
__newindex missUnregistered / non-writable member → errorsame
Bind-time flatteningPublic members along the inheritance chain are written into the current type’s three tables at EnsureBinding; no runtime walk upwardspec/02-TYPE-SYSTEM.md §5
dispatch closureRuntime dispatch closure bound to the default method name when multiple overloads existspec/04-METHOD-OVERLOAD.md
direct method closureBridge closure for a single overload, full-signature key, or alias; may use register_methodMetaBinding
Full-signature keyAuto-attached Name(Type.FullName,…) direct key when multiple same-name candidates exist (excludes return type)spec/04-METHOD-OVERLOAD.md §3.7

Marshal shapes

TermMeaningWhere implemented
ByValValue-type payload userdata (struct copy semantics)spec/marshal/05-STRUCT.md
ByObjManaged reference / boxed value userdata via ObjectRegistryspec/marshal/06-CLASS.md
OpaqueValueTemporary lightuserdata without metatable (ref/in/out or explicit annotation)spec/marshal/04-OPAQUE.md
StructHandleOpaque lightuserdata for struct on the default C#→Lua path (valid within the sync call chain)same + struct booklet
ReducedTypeKey for Il2Cpp bridge stub reuse by simplified signature; Mono does not reuse this wayimpl/codegen/
ConversionKindC# implicit conversion category used by overload dispatchspec/04-METHOD-OVERLOAD.md §3.6

Registry & lifetime

TermMeaningWhere implemented
ObjectRegistryByObj userdata slots + (identity, view) weak cache + GC rootspec/10-LIFETIME.md
StructRegistrynon-blittable struct userdata copies and GC scanning (Il2Cpp: NotBlittableStructRegistry)same
OpaqueParameterScopeGeneration domain for opaque handles while C# calls LuaOpaqueValueMarshal
Single lua_StateHost defaults to one main state; cross-thread must follow frame pump / sync rules§10 §4

Host API

TermMeaningWhere implemented
GetFunction<T>Formal C#→Lua entry; returns MulticastDelegate; caller caches itspec/01-HOST-API.md
[LuaMarshalAs]Marshal annotation on params / return values / fields / propertiesspec/marshal/02-MARSHAL-AS.md
[LuaAlias]Appends a final Lua name for a method; may collide with default/other aliases; grouped into overloads by namespec/04-METHOD-OVERLOAD.md §5
Delegate bridgeC#→Lua call path: GetFunction binds a function as a closed delegate then Invokespec/marshal/09-FUNCTION.md

Explicitly unsupported (rewrite rules)

TermMeaning
Event-specific metatableNo { get, set, fire } subtable; use ordinary add_EventName / remove_EventName methods
Runtime inheritance promotionInstance members are not looked up and cached along the chain on __index miss; use Bind-time flattening instead

Doc abbreviations

AbbrPath
SPECDocs/spec/**
IMPLDocs/impl/**
MTDocs/spec/metatable/**
MARDocs/spec/marshal/**