Go bindings for the Lua C API, enabling Go programs to embed and interact with Lua virtual machines.
GoLua is a Go binding library for the Lua C API that enables Go applications to embed Lua virtual machines and execute Lua scripts. It provides a bridge between Go and Lua, allowing developers to expose Go functions to Lua code and call Lua functions from Go, solving the need for scripting capabilities within Go programs.
Go developers who need to add Lua scripting support to their applications, such as game developers, tool creators, or anyone building extensible systems with embedded scripting.
Developers choose GoLua for its direct access to the Lua C API, support for multiple Lua versions (5.1-5.4) and LuaJIT, and its straightforward approach to error handling that converts Lua exceptions to Go panics for safer integration.
Go bindings for Lua C API - in progress
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Lua 5.1 through 5.4 via build tags, and optional LuaJIT integration, allowing developers to target multiple Lua versions without changing code.
Offers dynamic and static linking options with configurable build tags, adapting to different system library names and compilation setups, as detailed in the README.
Converts Lua exceptions to Go panics in DoString, DoFile, and Call methods, preventing crashes and enabling safer error management in Go.
Provides low-level bindings to the Lua C API, giving full control over Lua virtual machines and execution for advanced use cases, such as stack manipulation.
Lua's pcall and xpcall are renamed to unsafe versions and are risky when calling Go, restricting robust error handling within Lua scripts, as admitted in the README.
The lua.State type is not thread-safe, making it unsuitable for concurrent applications without careful synchronization, which is explicitly mentioned in the documentation.
Requires managing build tags for different Lua versions and library names, which can be cumbersome and error-prone for new users, as evidenced by the multiple tag options.
Lua coroutines are mentioned as likely problematic and untested, limiting their use for asynchronous scripting scenarios, adding risk for developers.