Am I understanding GDNative correctly?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nat
:warning: Old Version Published before Godot 3 was released.

Hi!

I would like to ask you if I’m understanding the GDNative concept correctly, especially in comparison with the module functionality. I would appreciate if you could pinpoint any discrepancies in what I write below.

From what I understand, for every given set of custom modules, there is a need to prepare proper export templates for every platform, and regardless of the platform, the module’s code always ends up statically linked in the final executable.

As for GDNative, from what I currently see, whatever code in whatever language you choose, needs to be compiled to the given operating system’s shared library format, be it DLL, dylib, so, etc., and naturally, is dynamically linked at runtime.

Assuming that the above is correct, I have the following questions.

  • in the case of iOS, and AppStore specifically, there used to be limitations to providing code in shared libraries, due to Apple policies. How does it look these days, and how does Godot package those shared libraries?
  • is GDNative going to be supported on all platforms, including the Emscripten export?

And as a small sidenote, now looking into Godot again after a while, I’m impressed how much Godot had improved in terms of usability compared to the times directly after open-sourcing the engine. Thank you for the hard work put into it!

This is an incredibly great question.

Hopefully :
Godot will break GDNative code into something lower like C
then just convert + bake the code into the outputted binary.

But I have no clue.

Will post back if I find an answer somewhere.

Thanks for bringing this up!

Grass H0PEr | 2017-09-30 03:34