boulder/moss: Reduce binary size by reducing dependency features #283
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I used cargo-bloat to find out what some of the biggest offenders with regards to binary size were and found that reqwest and regex could both be trimmed a bit by disabling some features that we don't need.
For regex I switched it to only have the
std
feature enabled. This disables some of the performance features and unicode support but as far as I can tell we don't use the unicode support and the existing regexes are in non-performance-critical sections. This reduces boulder binary size with therelease
profile from16.9MiB
->15.2MiB
.For reqwest I switched to using
native-tls
overrustls
. Since this links against the system openssl the binary size is further reduced from15.2MiB
->13.1MiB
.Final binary sizes when this patch is applied to the experimental Solus package (which already links against system libzstd and sqlite3) are: