One of the things I keep hitting my head against when using C and Lua together is the pd->system->lua struct standing in for the entire lua.h
I've already been unable to call a Lua function from C except by a global string, unable to create a table or set values, and unable to index a "class" with rawget/rawset. When searching the forum for help, I found some other people who had these exact problems. It seems to be a major flaw.
This is such a shame, too...! Lua's meant to be as seamless as can be between C. Considering the C callbacks already include the opaque (and currently useless) lua_State * argument, would it be possible to provide the lua.h that Playdate uses, and expose those Lua functions to the linker? I did try declaring the function prototypes, but the linker couldn't find them.
Thanks very much, to the team at Panic. This is such an awesome device and I'm excited to share my game soon.