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

Reduce binary size #72

Open
boruok opened this issue Mar 28, 2022 · 2 comments
Open

Reduce binary size #72

boruok opened this issue Mar 28, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@boruok
Copy link

boruok commented Mar 28, 2022

Is your feature request related to a problem? Please describe.

Is here any way to reduce binary size? for example, stripped sqlite binary size is 1.6mb compared to plugins x11 4.6mb.
Describe the solution you'd like

It might be useful on platforms where app size is important.

Describe alternatives you've considered

(https://www.sqlite.org/footprint.html)
Additional context

N/A

@boruok boruok added the enhancement New feature or request label Mar 28, 2022
@2shady4u
Copy link
Owner

2shady4u commented Mar 30, 2022

Hi @boruok,
The larger binary size is due to the GDNative interface being part of the binary vs. compiling a binary without any wrapper.

I don't really know if it is possible to reduce the binary size on my end? There might be some compiler flags that succeed in pushing down the size, but I'm not a compiler flag expert.

Out of curiosity, do you have a target application or a personal project that requires this reduction?

@boruok
Copy link
Author

boruok commented Mar 31, 2022

@2shady4u this personal (commercial) project for mobile devices.
So, i've managed to quicktest linux build, decreased libgdsqlite.so size from 4.6mb to 3.7mb.

  1. change CCFLAGS from -O3 to -Os
  2. strip generated binary

I wonder if there is an option to disable unwanted bindings on godot-cpp side...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants