Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv="1.63.0"
msrv="1.71.0"
10 changes: 7 additions & 3 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
rust:
- version: stable # STABLE
- version: 1.63.0 # MSRV
- version: 1.71.0 # MSRV
features:
- default
- blocking
Expand All @@ -30,6 +30,10 @@ jobs:
- async-https-native
- async-https-rustls
- async-https-rustls-manual-roots
- async-minreq
- async-minreq-https
- async-minreq-https-native
- async-minreq-https-rustls
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -52,13 +56,13 @@ jobs:
- name: Update toolchain
run: rustup update
- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.63.0'
if: matrix.rust.version == '1.71.0'
run: |
cargo update -p reqwest --precise "0.12.4"
cargo update -p minreq --precise "2.13.2"
cargo update -p home --precise "0.5.5"
cargo update -p url --precise "2.5.0"
cargo update -p tokio --precise "1.38.1"
cargo update -p tokio --precise "1.44.0"
cargo update -p security-framework-sys --precise "2.11.1"
cargo update -p native-tls --precise "0.2.13"
cargo update -p ring --precise "0.17.12"
Expand Down
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ documentation = "https://docs.rs/esplora-client/"
description = "Bitcoin Esplora API client library. Supports plaintext, TLS and Onion servers. Blocking or async"
keywords = ["bitcoin", "esplora"]
readme = "README.md"
rust-version = "1.63.0"
rust-version = "1.71.0"

[lib]
name = "esplora_client"
Expand All @@ -22,6 +22,7 @@ bitcoin = { version = "0.32", features = ["serde", "std"], default-features = fa
hex = { version = "0.2", package = "hex-conservative" }
log = "^0.4"
minreq = { version = "2.11.0", features = ["json-using-serde"], optional = true }
async_minreq = { version = "0.1.0", default-features = false, features = ["json-using-serde"], optional = true }
reqwest = { version = "0.12", features = ["json"], default-features = false, optional = true }

# default async runtime
Expand All @@ -47,3 +48,9 @@ async-https = ["async", "reqwest/default-tls"]
async-https-native = ["async", "reqwest/native-tls"]
async-https-rustls = ["async", "reqwest/rustls-tls"]
async-https-rustls-manual-roots = ["async", "reqwest/rustls-tls-manual-roots"]
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"]
# TODO async-mineq does not support it for now
# async-minreq-https-rustls-manual-roots = ["async-minreq"]
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Bitcoin Esplora API client library. Supports plaintext, TLS and Onion servers. B

## Minimum Supported Rust Version (MSRV)

This library should compile with any combination of features with Rust 1.63.0.
This library should compile with any combination of features with Rust 1.71.0.

To build with the MSRV you will need to pin dependencies as follows:

Expand All @@ -36,3 +36,16 @@ cargo update -p lock_api --precise "0.4.12"
cargo update -p [email protected] --precise "0.5.10"
cargo update -p [email protected] --precise "1.0.1"
```

## Experimental Features using [async-minreq](https://crates.io/crates/async_minreq)

async-minreq features are currently experimental but may become the only async client In the future once it's more mature.

Currently Supported features

```shell
async-minreq
async-minreq-https
async-minreq-https-native
async-minreq-https-rustls
```
Loading
Loading