Feature Request #2: Support explicitly closing Lua VMs from Lua instance directly and/or add a Lua::strong_count API
E.g. using lua_close. Following a close operation, safety could (probably) be ensured by disallowing any Lua VM operations whatsoever.
Right now you need to drop all references to Lua VM to do so.
Even if a explicit close method is not possible, it would be nice for mlua to at least expose a strong count api for debugging (I actually had to fork mlua and add Lua::strong_count() to track down where I'm leaking RawLua handles). It’d also be nice if mlua had a feature flag to block cloning of Lua at compile time
Lastly, would it be possible to make things like WeakLua::state etc not panic if the Lua VM is destroyed somehow and instead return an error (and would doing so be beneficial?)
Upon further thought, I think just exposing strong count would solve this issue entirely (the debug process at least would be solved)
Is there any update here regarding a close and/or strong count API