Documentation
¶
Overview ¶
Command gluagen generates Lua binding code for Go packages.
Annotation mode (default):
gluagen [flags] <package-path>
Scan mode (for existing packages):
gluagen --scan <import-path> [flags]
Flags:
-o file Output file (default: stdout) -pkg name Output package name (default: same as input; "bindings" in scan mode) -module name Lua module name (default: package name) -scan path Scan a Go package by import path (e.g., "strings", "math") -include list Comma-separated functions to include (scan mode only) -exclude list Comma-separated functions to exclude (scan mode only)
In annotation mode, gluagen scans the specified Go package directory for //glua:bind annotations and generates type-safe Lua binding code.
In scan mode, gluagen uses go/types to load any Go package by import path and generates bindings for all exported functions with supported parameter types.
Click to show internal directories.
Click to hide internal directories.