From 2fc6f0fa7c05493b417e27464ceda541d0a1ceb8 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Tue, 13 Aug 2024 09:13:41 -0400 Subject: [PATCH] demo: update to axum-server v0.7.1 Switch to the `tls-rustls-no-provider` feature added in v0.7.1. Since v0.7.0 the `tls-rustls` feature uses rustls v0.23 which require a per-process (or thread) `CryptoProvider` be set. By default, rustls uses `aws_lc_rs` which requires `cmake` et al. to build. Worse, `axum-server` doesn't re-export the relevant `rustls` symbols, so one has to declare a direct `rustls` dependency and keep it in sync to call the required initialization function. Since this is a basic example, just disable to provider for simplicity. --- demo/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/Cargo.toml b/demo/Cargo.toml index 87264dd..9ee1ba1 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -20,7 +20,7 @@ rand = { version = "0.8.5" } rand_core = { version = "0.6.4" } ark-ff-macros = { version = "0.4.2", default-features = false } axum = "0.7" # or the latest version -axum-server = { version = "0.6", features = ["tls-rustls"] } +axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] } tokio = { version = "1", features = ["full"] } tracing = "0.1" # Ensure you have tracing tracing-subscriber = { version = "0.3", features = ["env-filter"] }