概要
This skill provides expert guidance on the Lua-C API, enabling developers to bridge the gap between high-level scripting and low-level performance. It covers essential patterns for virtual stack manipulation, the creation of native C modules, and the implementation of custom userdata types with metatables. Whether you are embedding Lua into a game engine or building high-performance native libraries for a Lua environment, this skill ensures robust memory management, efficient bidirectional communication, and optimal error handling across the language boundary.