Replacing reqwest crate with async_minreq crate#128
Replacing reqwest crate with async_minreq crate#128psg-19 wants to merge 2 commits intobitcoindevkit:masterfrom
Conversation
tnull
left a comment
There was a problem hiding this comment.
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.
notmandatory
left a comment
There was a problem hiding this comment.
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 16983255418Details
💛 - 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
notmandatory
left a comment
There was a problem hiding this comment.
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
|
@oleonardolima can we close this one, since we're moving to |
I'm not sure what @notmandatory plans are for this one, but I'd be fine with closing it. |
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 fmtandcargo clippybefore committingNew Features: