Description
Hello!
I just tried out compiling the Hello World example, which was a surprisingly smooth process, so props for that!
However, when I inspected the binary that was generated on Windows, it was 400+ KB. That surprised me since it was a small "Hello World" program. I ran cargo in release mode cargo build --release
and got the binary down to 245 KB which is still quite large.
I decided to investigate the hello_world.dll binary using snowman disassembler and Strings utility what I discovered is that there's a large chunk of error text that gets inserted into the binary (approx. 64KB), containing a TON of error messages like this:
API function missing: godot_gdnative_core_api_struct.godot_color_new_rgba
API function missing: godot_gdnative_core_api_struct.godot_color_new_rgb
...
Here is the output of the Strings tool: https://gist.github.com/bhgsbatista/0785a806052f247c9b2e72dc8583366f
Basically for every API function we link against, we inject this error message if it's not found. Seems like something we should skip doing for release builds.