PSA: if you are using (modern) C++, https://github.com/ThePhD/sol2 makes embedding Lua incredibly easy and straightforward.