What do you mean "runtime" ? You have to compile some C code with macros to wrap a unique type signature for each function you want to wrap, so this seems to require a compilation step unlike e.g. ctypes which is a runtime FFI. If there's a compilation step, why wouldn't I just want to use Pyrex/Cython which let me write this:<p><pre><code> def py_do_something(float a, float b):
return c_do_something(a,b)
</code></pre>
while, during the Pyx -> .c compilation step, taking care of all the C API plumbing (refcounting, initializing a module structure, type checking etc.)