I don't think that this approach is that good. First of all, you need to write a custom "interface" file. Then, you need to integrate running of swig into your build process, which makes the build complicated.
With sol, it's much easier - you just register function/classes in your C++ code - it's much easier to do than with Lua C API and doesn't require running any "post-processing" steps at all.
Have you tried sol2? It's vastly more capable and transparent. It's also 100% native C++ code, so is just part of your application, with no extra tooling required.
With sol, it's much easier - you just register function/classes in your C++ code - it's much easier to do than with Lua C API and doesn't require running any "post-processing" steps at all.