Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about .gdextension file #9383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paddy-exe
Copy link
Contributor

This is a WIP draft in the effort to improve the GDExtension docs for users

Adds details how to configure the .gdextension file and aids as a quick reference guide to add support for platforms

@paddy-exe paddy-exe added content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels May 15, 2024
@paddy-exe paddy-exe requested a review from dsnopek May 15, 2024 23:55
@paddy-exe paddy-exe force-pushed the gdextension-file-quick-reference branch from 2b73f33 to f567fa1 Compare May 15, 2024 23:57
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great!

Only a few notes, mostly small wording changes for clarity.

tutorials/scripting/gdextension/gdextension_file.rst Outdated Show resolved Hide resolved
tutorials/scripting/gdextension/gdextension_file.rst Outdated Show resolved Hide resolved
tutorials/scripting/gdextension/gdextension_file.rst Outdated Show resolved Hide resolved
tutorials/scripting/gdextension/gdextension_file.rst Outdated Show resolved Hide resolved
tutorials/scripting/gdextension/gdextension_file.rst Outdated Show resolved Hide resolved
@paddy-exe paddy-exe force-pushed the gdextension-file-quick-reference branch from b47f96d to 90e7155 Compare May 17, 2024 19:32
@paddy-exe paddy-exe force-pushed the gdextension-file-quick-reference branch from 90e7155 to ac065d9 Compare May 17, 2024 20:19
@paddy-exe paddy-exe force-pushed the gdextension-file-quick-reference branch from ac065d9 to 91b93c8 Compare May 19, 2024 00:47
@paddy-exe paddy-exe marked this pull request as ready for review May 19, 2024 00:49
@paddy-exe paddy-exe force-pushed the gdextension-file-quick-reference branch from 91b93c8 to cea6ef0 Compare May 27, 2024 15:31
@paddy-exe
Copy link
Contributor Author

Thanks for the feedback! Should be good now

Update tutorials/scripting/gdextension/gdextension_file.rst
@paddy-exe paddy-exe force-pushed the gdextension-file-quick-reference branch from cea6ef0 to ecc21c6 Compare May 29, 2024 14:06
@paddy-exe
Copy link
Contributor Author

Updated to feedback, added another sections about icons support and removed the icons section from the Example page as it makes no sense to have it double

Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is looking very nice :-)

I just have a few suggestions, mostly small wording changes for clarity.

Comment on lines +20 to +21
| **entry_symbol** | Name of the entry function for initializing the GDExtension. This function should be defined in |
| | the ``register_types.cpp`` file. Adding this is necessary for the extension to work. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note about register_types.cpp is only for godot-cpp. Maybe something like:

Suggested change
| **entry_symbol** | Name of the entry function for initializing the GDExtension. This function should be defined in |
| | the ``register_types.cpp`` file. Adding this is necessary for the extension to work. |
| **entry_symbol** | Name of the entry function for initializing the GDExtension. This function should be defined in |
| | the ``register_types.cpp`` file when using godot-cpp. Adding this is necessary for the extension to work. |

| | depend on features from newer versions of Godot. **Only supported for Godot 4.1+** |
+-------------------------------+------------------------------------------------------------------------------------------------------+
| **compatibility_maximum** | Maximum compatible version. This prevents newer versions of Godot from loading the extension. |
| | **Only supported for Godot 4.3+** |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| | **Only supported for Godot 4.3+** |
| | **Only supported in Godot 4.3+** |

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"or later" might also be good to add.

| | the ``register_types.cpp`` file. Adding this is necessary for the extension to work. |
+-------------------------------+------------------------------------------------------------------------------------------------------+
| **compatibility_minimum** | Minimum compatible version. This prevents older versions of Godot from loading extensions that |
| | depend on features from newer versions of Godot. **Only supported for Godot 4.1+** |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| | depend on features from newer versions of Godot. **Only supported for Godot 4.1+** |
| | depend on features from newer versions of Godot. **Only supported in Godot 4.1+** |

Comment on lines +29 to +30
| **reloadable** | Reloads the extension upon recompilation. Reloading is not supported for every exposed class. |
| | This flag should be mainly used for developing or debugging an extension. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is meant by "Reloading is not supported for every exposed class"? It should work for any class, although, some can have additional considerations, for example, editor plugins.

It may be worth pointing out that not all GDExtension bindings support it? We could mention that godot-cpp for Godot 4.2+ does - I'm not sure it makes sense trying to list other bindings, because that list will always be growing

| **reloadable** | Reloads the extension upon recompilation. Reloading is not supported for every exposed class. |
| | This flag should be mainly used for developing or debugging an extension. |
+-------------------------------+------------------------------------------------------------------------------------------------------+
| **android_aar_plugin** | The GDExtension is part of a :ref:`v2 Android plugin <doc_android_plugin>`. During export this flag |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear from this description that this is a boolean property. Perhaps we should be listing the type for each property?

---------------------

+-------------------------------+------------------------------------------------------------------------------------------------------+
| Instruction | Description |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about calling these "Instruction"s. Maybe "Property" instead?

Suggested change
| Instruction | Description |
| Property | Description |

-----------------

In this section you can set the paths to the compiled binaries of your GDExtension libraries.
By setting feature flags you can filter which version should be loaded and exported with your
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
By setting feature flags you can filter which version should be loaded and exported with your
By specifying feature flags you can filter which version should be loaded and exported with your

In this section you can set the paths to the compiled binaries of your GDExtension libraries.
By setting feature flags you can filter which version should be loaded and exported with your
game depending on which feature flags are active. Every feature flag must match to Godot's
feature flags or your custom export flags to run in an exported game. For instance ``macos.debug``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
feature flags or your custom export flags to run in an exported game. For instance ``macos.debug``
feature flags or your custom export flags to be loaded in an exported game. For instance ``macos.debug``

linux.release.rv64 = "res://bin/libgdexample.linux.template_release.rv64.so"


Here are lists of available built-in options (for more look at the :ref:`feature tags <doc_feature_tags>`):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here are lists of available built-in options (for more look at the :ref:`feature tags <doc_feature_tags>`):
Here are lists of some of the available built-in options (for more look at the :ref:`feature tags <doc_feature_tags>`):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants