gluagen

command
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL