Add documentation page about gdextension_interface.json#11551
Conversation
3a1c259 to
9541b14
Compare
gdextension_interface.jsongdextension_interface.json
6cc4e3a to
2070544
Compare
Bromeon
left a comment
There was a problem hiding this comment.
Great writeup, thanks a lot 👍 I especially like the examples after each section, they clarify a lot!
In the future, there might be a section about the I'm not sure if "interface JSON" and "API JSON" are clear enough because the "I" in "API" is also "interface". Would a different term make sense here? In Rust I will likely keep using "header", which isn't very precise, but at least distinct enough for all practical purposes. One defines the actual C interface (or FFI), while the other is more a specification/definition of concrete engine symbols (classes, enums, etc.)... Maybe some inspiration here? |
2070544 to
fee76a1
Compare
|
@Bromeon Thanks! I attempted to integrate all of your suggestions in my latest push :-)
Hm, yeah. The When writing the note I added about |
f62db14 to
35f5c80
Compare
paddy-exe
left a comment
There was a problem hiding this comment.
Small language nitpick. Otherwise this reads well. Great page addition!
As always thanks for including examples :)
I think it's a good start, but "high vs. low" is still very abstract... All of "ClassDB API", "classes API", "class specification", "class definitions" would be more concrete -- do you not think something along that would be possible? Without renaming the file now, of course. But high/low isn't reflected in the filename, either... The C API could still be "low-level interface", "C interface", "FFI interface" etc. Something that distinguishes the technical interface from the API JSON, which is more a specification or type database. But I don't know, naming is hard 😅 |
Ivorforce
left a comment
There was a problem hiding this comment.
Looks good to me, I've got only nitpicks!
35f5c80 to
e46dd1d
Compare
Bromeon
left a comment
There was a problem hiding this comment.
Looks really good! I only have a few remarks left, and they're bordering nitpicking territory 🙂
| - ``return_value``: An object which has a ``type`` (which may include modifiers), and ``description``. | ||
| It will always be given, and use ``void`` as the ``type`` if the function returns no value. |
There was a problem hiding this comment.
This is more a question about the format:
It will always be given, and use
voidas thetypeif the function returns no value.
Is there a good reason to deviate from extension_api.json here, which omits the return_value key for void return types? Notably, the key is called "return value", not "return type" 🤔
There was a problem hiding this comment.
Hm, well, the implementation was easier :-)
We already have "void" as a valid type (so that we can have "void *" and other modifiers) and simply always requiring this is simpler than having to check if it exists
I can look at what it would take to change the parsers. We'd then have to decide if we want to disallow explicitly specifying a return type of "void" (and force it to be omitted in that case), which would need to be reflected in the parsers and the schema
There was a problem hiding this comment.
Here's a PR that changes the format to omit the return_value for void functions: godotengine/godot#114684
179a08c to
e784e3c
Compare
e784e3c to
6d01998
Compare
6d01998 to
221e0ed
Compare
|
Thanks! |


This adds documentation on the
gdextension_interface.jsonfile that was added in PR godotengine/godot#107845It attempts to address the remaining issues brought up on godotengine/godot#113732
cc @Bromeon
Fixes godotengine/godot#113732