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

Binary sizes much smaller than stated in FAQ #155

Open
bkauler opened this issue Aug 29, 2022 · 2 comments
Open

Binary sizes much smaller than stated in FAQ #155

bkauler opened this issue Aug 29, 2022 · 2 comments

Comments

@bkauler
Copy link

bkauler commented Aug 29, 2022

Quoting from FAQ:
Sizes of "example_01_basic_app":
Linux x64 binary: 608 kB

However, with a little bit of optimization and stripping, I get 127KB for a x64 Linux binary. For example_02_controls, 135KB.

I compiled like this:

# nim c -d:release --opt:size -d:useMalloc --mm:orc --passC:-flto --passL:-flto --path:../src example_02_controls.nim

When I first looked at NiGui, that 608KB turned me off. So I went elsewhere. Came back later and decided to confirm binary size for myself.

Binary size could be further reduced if you have the option of generating the widget wrappers as a shared library. Then, if a Linux distribution has a few GUI apps written in NiGui, the total size will be very low.

I am just getting started with Nim, and only yesterday started looking at GUI toolkits. I posted to my blog about the "ui" module:

https://bkhome.org/news/202208/ui-gui-toolkit-for-nim.html

The ui example binary is only 27KB, the shared library 187KB.

@theAkito
Copy link

When I first looked at NiGui, that 608KB turned me off.

On which tiny micro-controller do you want to run a GUI app?

@simonkrauter
Copy link
Owner

Yes, the numbers should be updated. On my linux system the example_01_basic_app is now 407 kB.

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

No branches or pull requests

3 participants