Open iffy opened 10 months ago
Is it because of the {.used.} pragma I see in various places? Or something else?
{.used.}
should not affect this at all - that's a pure nim-side construct - I too would be interested to know in depth what is causing the symbol references - ie it could be that some constant or semi-constant is getting generated somewhere that touches the symbols causing them to be included but this would require some digging. Happy to look at a PR if you find something!
BearSSL advertises:
And in another place
When wrapped in
nim-bearssl
, though, it seems like some of the pluggable-ness is gone. For instance, compiling the following, which only uses MD5 still includes symbols for SHA algorithms:Or in this example, nothing from BearSSL is used, yet the resulting binary contains all of BearSSL:
I'm not complaining, just observing. I'm even willing to submit a PR to enhance this. While in my case this isn't a critical feature, it certainly would be nice to have smaller binaries.
Is it because of the
{.used.}
pragma I see in various places? Or something else?