So for this you're going to need two things:
- A generic library for dynamically generating assembly that wraps GD functions into non-static runtime structures that you can then easily manipulate into the target language's types
- A runtime for the target language that converts the library wrappers into language types and back
The generic library of step 1. can just be like a CMake file and a header + source file that are embedded in each runtime separately. This also requires TulipHook to expose its assembly generators (which I believe it does already).
So first you run through the bindings' codegen data and collect all the types and functions that are referred to in bindings and then you generate this epic code. I've marked everything that has to be generated from codegen data using the fictional [[generate]]
attribute