-
Notifications
You must be signed in to change notification settings - Fork 65
Replacing reqwest crate with async_minreq crate #128
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
base: master
Are you sure you want to change the base?
Replacing reqwest crate with async_minreq crate #128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty substantial change that also breaks compatibility between rust-esplora-client
versions. That said, I really like the idea of eventually getting rid of the huge dependency tree of reqwest
.
Given that this PR seems to be based on a draft fork-of-a-fork branch that was edited without any code review, I think it would be very important to move the async-minreq
crate to the bitcoindevkit
org, have it undergo proper code review, and introduce co-maintainers before we'd want to take on this new dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start and glad to see tests are passing. Per our call here are comments so far.
@tnull thanks for taking a look, @psg-19 is my summer of bitcoin mentee. I agree this is a big change but as you pointed out the goal is to reduce the dependency tree. I and @psg-19 will work with @BEULAHEVANJALIN on |
Pull Request Test Coverage Report for Build 16971959331Details
💛 - Coveralls |
c1a5925
to
aaf4d9c
Compare
aaf4d9c
to
008a6f0
Compare
Another option we should consider for this PR is making async-minreq = ["async_minreq", "async_minreq/proxy", "tokio?/time"]
async-minreq-https = ["async-minreq", "async_minreq/https"]
async-minreq-https-native = ["async-minreq", "async_minreq/https-native"]
async-minreq-https-rustls = ["async-minreq", "async_minreq/https-rustls"]
async-minreq-https-rustls-manual-roots = ["async-minreq"] |
The latest commit to feature flag the
|
bb5f2f5
to
1cba85c
Compare
0d930d7
to
44d6d10
Compare
44d6d10
to
8b79d1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found two small doc changes that are needed, but otherwise this looks good and I should be able to approve once those are fixed and I've done a little manual testing.
f368571
to
43ad5f2
Compare
43ad5f2
to
5414409
Compare
Addresses #121
Overview
This PR replaces our reqwest-based async client with a lightweight async-minreq fork. All existing unit tests pass, but because async-minreq pulls in Tokio 1.44.0 and Tokio-rustls 0.26.2, the project’s MSRV must be bumped to 1.71.0 in CI.
Changes
Dependency swap
async_minreq = { git = "https://github.com/psg-19/async-minreq" }
Async client rewrite
Tests & MSRV
Looking forward to feedback on these changes and any suggestions for improvement!
Binary Size And Dependency tree
Command used for calculating dependency tree -> cargo tree --no-default-features --features xyz | wc -l
My Machine specs -> intel i7 12th gen, rtx 3050ti
OS -> windows subsystem for linux
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features: