Skip to content

[Draft Feature] Hook System for Binding Generation#2023

Draft
Togira123 wants to merge 1 commit into
godotengine:masterfrom
Togira123:hook-mvp-v2
Draft

[Draft Feature] Hook System for Binding Generation#2023
Togira123 wants to merge 1 commit into
godotengine:masterfrom
Togira123:hook-mvp-v2

Conversation

@Togira123

@Togira123 Togira123 commented Jul 16, 2026

Copy link
Copy Markdown

This draft aims to collect more feedback and ideas on a hook system for binding generation. The core idea is that users should be able to extend/modify the way the bindings are generated. The current implementation adds a new command to SCons, called binding_hook_file, which takes a file path to a python file. The specified python file should define a class that extends BindingGeneratorHooks and is called BindingGeneratorHooksExtension. It can then override the methods provided there to modify the way the bindings are generated. As an example, there is custom_generator.py included in this draft (won't be included in the final PR), which adds names of signals as constants for each header file. It can be tested using scons binding_hook_file=custom_generator.py.

The current implementation was already discussed here: https://chat.godotengine.org/channel/gdextension/thread/2gR6bngEu57tWLQG9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant