What is Nostr?
Yuki Kishimoto
npub1drv…seet
2024-11-06 12:46:02
in reply to nevent1q…ev29

Yuki Kishimoto on Nostr: To reduce speed compilation you can disable all default features (I'll probably ...

To reduce speed compilation you can disable all default features (I'll probably disable all feature by default in future) and, to reduce the binary size, change some `profile.release` config.

Tests for the example I shared yesterday:

Default features and default release profile:
* compilation time: 43 secs
* cdylib size: 479kb
* staticlib size: 58Mb

Without default features but with default release profile:
* compilation time: 31 secs
* cdylib size: 479kb
* staticlib size: 49Mb

Without default features and with LTO enabled, codegen-units set to 1 and abort on panic (but still optimized for performance instead of size):
* compilation time: 35 secs
* cdylib size: 437kb
* staticlib size: 12Mb

Same as above but optimized for size (not aggressive):
* compilation time: 30 secs
* cdylib size: 427kb
* staticlib size: 9.5Mb

I not plan to write a sync version of the SDK, also if very very basic. But I can try to reduce the above values as much as possible.
Author Public Key
npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet