jaemk / self_update

Self updates for rust executables
MIT License
796 stars 69 forks source link

Change `reqwest` dependency against `isahc` #116

Closed Kijewski closed 1 year ago

Kijewski commented 1 year ago

This PR removes reqwest, and its transitive dependencies like tokio, and uses isahc instead. The latter library uses curl as HTTP client. libcurl should be installed by default on all current Windows and MacOS installations, and most likely by all serious Linux distros, too.

libcurl is only loaded at runtime instead of being a hard dependecy. This way, if libcurl is not installed, the program will still run just fine, but the self update will fail.

This changes makes the github example much smaller:

1808048 github.master
1476544 github.patch
-331504 bytes or -18%
$ size github.master github.patch
   text    data    bss      dec  filename
1738914   52288    529  1791731  github.master
1406298   40616   1840  1448754  github.patch
-332616  -11672  +1311  -342977
Kijewski commented 1 year ago

Closed in favor of #117.