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

Change reqwest dependency against isahc #116

Closed
wants to merge 1 commit into from

Conversation

Kijewski
Copy link
Contributor

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

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:

```text
1808048 github.master
1476544 github.patch
-331504 bytes or -18%
```

```text
$ 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 Kijewski marked this pull request as ready for review September 18, 2023 02:27
@Kijewski
Copy link
Contributor Author

Closed in favor of #117.

@Kijewski Kijewski closed this Sep 18, 2023
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

Successfully merging this pull request may close these issues.

1 participant