-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registrable generators: add support for lua, python #1808
base: main
Are you sure you want to change the base?
Registrable generators: add support for lua, python #1808
Conversation
I have to refactor the last part which interferes with this PR: the passes. |
Haven't gone through this in detail yet, but can you explain what it means for a generator to be registrable? Why do we need this new concept? |
I am not finished yet though, this is just is bare minimal implementation, still many concepts missing: templates, protected base classes, typemaps to name a few. So I advise you to not review the code in detail because, the common code will be extracted away. Structural:Just like the C# generator, it is C++-like code structure for binding. class Type {
Type();
void method();
} Registrable:Like sol, pybind, luabind, and any C++ helper library built on top of a C style API Scope {
type<Type>(state)
.constructor<Type>()
.method("method", &method);
} Functional:Here bindings will heavily rely on creating a separate function for each binding entity (just like with pure C API): void wrapper_type_constructor(state s) {
// ...
}
void wrapper_type_method(state s) {
// ...
}
// And then we register all the functions to the state. So I thought creating a base generator for each of these 3 concepts will ease the extension for newer one. I prefer these categories to reside in separate folders not in the current hierarchy, but for now I will keep them there to avoid messing with the build system.
As far as I noticed, the only feature complete generator to some extent is the C#/CLI one (it is a general assessment), the others are just prototypes, incomplete work etc..., with a lot of redundancy between them. |
b355d26
to
6360b77
Compare
Hey @deadlocklogic, haven't heard from you in a while, hope everything is good. Are you still interested in working on this? Lua support would be really awesome to have and you've done quite a lot of nice work on this already! |
@tritao Honestly I did quite a lot of work on Lua and other languages. |
This PR will add support for registrable generators: lua, python etc..., basically any language which has a registration API.
This will be the migration of my own work which I talked about many times before, it should be a straightforward task, bear with me.