-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Thank you for your work on this project.
I have some questions and would be very thankful to have some answers.
Let's assume I have exposed multiple classes to Lua with LuaBridge3. They include simple structs like Vectors where lifetime is managed by Lua but also pointers to objects where the host manages lifetime.
When pushing a C++ pointer to Lua is it possible to dynamically choose what exposed class to use?
I often do not know the exact type at compile time.
class A
class B : A // B inherits A
Let's say I have a pointer of type A but it's actually an instance of class B and I want to push the pointer as if it was B.
I think it would require a dynamic database or something of the class keys in ClassInfo.h.
Is something like this possible with LuaBridge3?
Can C++ exposed classes be extended in Lua?
I would like to add functions to C++ exposed classes in Lua. Ideally one could even override existing C++ functions and also call the function of the parent class.
I know that userdata types cannot be extended in Lua but is there some other way to achieve that? Or am I wrong?
Security on possible malicious Lua scripts.
Let's assume we only expose known safe functions to Lua and forbid bytecode. Did you do some research or tests on LuaBridge3 whether it is safe to run unknown Lua code.
What are your future plans with LuaBridge3?
Would be nice if you could share your plan on features etc. you might be working on in the future.
Thank you again for your work and time.