Is there any lua binding solutions that can bind a C++ class to lua? Including lua function callback.
Yes, you can write your own Native Extension (NE) and communicate between C/Cpp code and Lua code.
There is native extensions manual:
C API functions:
Regarding Lua function callback.
Example of callback registration:
I know this, but I found If I want to bind a C++ class to lua, it has a lot of glue codes, Is there some solutions like tolua?
There are several tools for generating Lua bindings from header files etc I haven’t tried any of them myself though.
I’ve heard of sol and sol2 in the list above and it is supposedly a very good solution.