1. Marcus von Appen
  2. py-sdl2
  3. Issues
Issue #28 wontfix

Bindings autogeneration

created an issue

I looked at the bindings a bit and see they are in a lot of way isomorphic with the C API.

You could automatically generate the isomorphic parts and write binding specification for the generator instead. That way there would be less pressure in keeping all the bindings updated if the API gets minor upgrades. People would spend less time writing bindings and doing something awesome instead.


Comments (1)

  1. Marcus von Appen repo owner

    The SDL2 APIs are not changing in a fast paced manner, which makes it necessary to recreate the bindings every time.

    When I played with a quite mature C parser (the one also used by pyglet) to create the bindings automatically, I found it problematic to sort out the platform specific bits and quirks, SDL2 uses in its headers, which made cleaning up the generated python files a more demanding task than to type in a few lines of code.

    That being said, I appreciate the idea of generating bindings on the fly, but do not see this as a feasible option for the current SDL2 API and complexity within its header files.

  2. Log in to comment