Open pekim opened 4 years ago
Are you talking about invoking library functions from typelib files via GIRepository Manager?
If so then, here is a conversation that I had with the Gtk-Rust team
To conclude, gir-xml files are more complete compared to typelibs.
The current generation code is unfortunately an unmaintainable mess. I had no idea when I started writing it how many parameter types and variations there were. Nor did I understand how many of the permutations would need to be handled. As a result I can't see a way to migrate the current code to a better place. I'd normally prefer to iteratively refactor code to improve it, but in this case I don't think that it's practical.
The generated code is also problematic in that it's very slow to build. This is mostly because of the extensive use of cgo. It's in every wrapping function, and there are many generated C functions for callbacks. This makes development of gobbi painful, with continuous rounds of code generation and slow builds.
It's difficult to move forward with the code as it is. Issues #16 and #17 are examples of cases where I struggle to work with the existing generation code.
I am looking at re-writing to use girepository for invocation of library functions.
Pros
Cons
Initial work is proving promising. It will be at least several more weeks before it's in a reasonably useable state.