I did not understand what you meant by "custom VM" and how that could be helpful.
Any way I think about this, shared or static, it seems inevitable that I would need to have some wrappers on top of or at least version-decorated Lua API types and functions. And macros, because they are heavily used. That seems rather messy to maintain even for one Lua version, and for multiple it can become a problem in itself. Any ideas here?