Skip to content

Commit 7614379

Browse files
committed
Make reqwest use native-tls
The new 0.11.7 release of reqwest depends on rustls-0.20, which does not work with our MSRV (1.48). We could downgrade our dependency on reqwest to pin it to 0.11.6, or we could avoid rustls. Given that the native tls dependency is ubiquitous, it seems easy enough to side-step the problem this way. As a side benefit, we should get a slightly faster build because we are not building rustls in the common case. The only problem is the cross-compilation of the Raspberry Pi build, but we can side-step that by using rustls in that single case. Confirmed that the web interface continues to work after this change.
1 parent 681ae53 commit 7614379

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/release.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ main() {
6363
linux-armv7-rpi)
6464
[ ! -f .cargo/config ] || err "Won't override existing .cargo/config"
6565
cp .cargo/config.rpi .cargo/config
66+
# TODO(jmmv): Should figure out how to cross-compile with the native TLS library
67+
# instead of doing this hack.
68+
sed -i s,native-tls,rustls-tls,g std/Cargo.toml
6669
# TODO(jmmv): Should enable --features=sdl but need to figure out how to cross-build
6770
# for it.
6871
( cd cli && cargo build --release --verbose --features=rpi )

std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ features = ["small_rng", "std", "std_rng"]
3939
[dependencies.reqwest]
4040
version = "0.11"
4141
default-features = false
42-
features = ["rustls-tls"]
42+
features = ["native-tls"]
4343

4444
[dev-dependencies]
4545
flate2 = "1.0"

0 commit comments

Comments
 (0)