I use an numeric id but thats not much different than what you're doing. I decided to stay away from light user data (pointers) on the Lua side but it is there if you want to use it. You just need to be really careful with GC.
I use nested tables as well - usually for what would be an array of structures in c. The only issue is consuming it on the bmx side can get a bit confusing with the remembering where you are on the stack crap.
I use nested tables as well - usually for what would be an array of structures in c. The only issue is consuming it on the bmx side can get a bit confusing with the remembering where you are on the stack crap.