update deps

This commit is contained in:
David Pedersen
2023-03-23 22:38:37 +01:00
parent 49183e404e
commit 44bb38dfa2
20 changed files with 23 additions and 93 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ async-trait = "0.1.67"
bytes = "1.0"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http = "0.2.7"
http-body = "0.4.5"
http-body = "1.0.0-rc.2"
mime = "0.3.16"
pin-project-lite = "0.2.7"
sync_wrapper = "0.1.1"
@@ -35,7 +35,7 @@ rustversion = "1.0.9"
[dev-dependencies]
axum = { path = "../axum", version = "0.6.0", features = ["headers"] }
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
hyper = "0.14.24"
hyper = "1.0.0-rc.3"
tokio = { version = "1.25.0", features = ["macros"] }
tower-http = { version = "0.4", features = ["limit"] }
+3 -3
View File
@@ -39,7 +39,7 @@ axum = { path = "../axum", version = "0.6.9", default-features = false }
bytes = "1.1.0"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http = "0.2"
http-body = "0.4.4"
http-body = "1.0.0-rc.2"
mime = "0.3"
pin-project-lite = "0.2"
tokio = "1.19"
@@ -63,8 +63,8 @@ tokio-util = { version = "0.7", optional = true }
[dev-dependencies]
axum = { path = "../axum", version = "0.6.0", features = ["headers"] }
http-body = "0.4.4"
hyper = "0.14"
http-body = "1.0.0-rc.2"
hyper = "1.0.0-rc.3"
reqwest = { version = "0.11", default-features = false, features = ["json", "stream", "multipart"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.71"
+3 -7
View File
@@ -22,7 +22,7 @@ matched-path = []
multipart = ["dep:multer"]
original-uri = []
query = ["dep:serde_urlencoded"]
tokio = ["dep:tokio", "hyper/server", "hyper/tcp", "hyper/runtime", "tower/make"]
tokio = ["dep:tokio", "hyper/server", "tower/make"]
tower-log = ["tower/log"]
ws = ["tokio", "dep:tokio-tungstenite", "dep:sha1", "dep:base64"]
@@ -36,8 +36,8 @@ bitflags = "1.0"
bytes = "1.0"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http = "0.2.9"
http-body = "0.4.4"
hyper = { version = "0.14.24", features = ["stream"] }
http-body = "1.0.0-rc.2"
hyper = "1.0.0-rc.3"
itoa = "1.0.5"
matchit = "0.7"
memchr = "2.4.1"
@@ -50,10 +50,6 @@ tower = { version = "0.4.13", default-features = false, features = ["util"] }
tower-layer = "0.3.2"
tower-service = "0.3"
# wont need this when axum uses http-body 1.0
hyper1 = { package = "hyper", version = "1.0.0-rc.3", features = ["server", "http1"] }
tower-hyper-http-body-compat = { version = "0.1.4", features = ["server", "http1"] }
# optional dependencies
axum-macros = { path = "../axum-macros", version = "0.3.7", optional = true }
base64 = { version = "0.21.0", optional = true }
@@ -6,7 +6,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = "0.14"
hyper = "1.0.0-rc.3"
tokio = { version = "1.0", features = ["full"] }
tower = "0.4"
tower-http = { version = "0.4.0", features = ["map-request-body", "util"] }
+1 -1
View File
@@ -6,5 +6,5 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
+1 -1
View File
@@ -9,5 +9,5 @@ axum = { path = "../../axum" }
tokio = { version = "1.0", features = ["full"] }
[dev-dependencies]
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
+1 -1
View File
@@ -6,7 +6,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["make"] }
tracing = "0.1"
-14
View File
@@ -1,14 +0,0 @@
[package]
name = "example-hyper-1-0"
version = "0.1.0"
edition = "2021"
publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tower-http = { version = "0.4", features = ["trace"] }
tower-hyper-http-body-compat = { version = "0.1", features = ["http1", "server"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
-52
View File
@@ -1,52 +0,0 @@
//! Run with
//!
//! ```not_rust
//! cargo run -p example-hyper-1-0
//! ```
use axum::{routing::get, Router};
use std::net::SocketAddr;
use tokio::net::TcpListener;
use tower_http::trace::TraceLayer;
use tower_hyper_http_body_compat::TowerService03HttpServiceAsHyper1HttpService;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
// this is hyper 1.0
use hyper::server::conn::http1;
#[tokio::main]
async fn main() {
tracing_subscriber::registry()
.with(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| "example_hyper_1_0=debug".into()),
)
.with(tracing_subscriber::fmt::layer())
.init();
let app = Router::new()
.route("/", get(|| async { "Hello, World!" }))
// we can still add regular tower middleware
.layer(TraceLayer::new_for_http());
// `Router` implements tower-service 0.3's `Service` trait. Convert that to something
// that implements hyper 1.0's `Service` trait.
let service = TowerService03HttpServiceAsHyper1HttpService::new(app);
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
let tcp_listener = TcpListener::bind(addr).await.unwrap();
tracing::debug!("listening on {addr}");
loop {
let (tcp_stream, _) = tcp_listener.accept().await.unwrap();
let service = service.clone();
tokio::task::spawn(async move {
if let Err(http_err) = http1::Builder::new()
.keep_alive(true)
.serve_connection(tcp_stream, service)
.await
{
eprintln!("Error while serving HTTP connection: {http_err}");
}
});
}
}
+1 -1
View File
@@ -6,5 +6,5 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1", features = ["full"] }
+1 -1
View File
@@ -7,7 +7,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
openssl = "0.10"
tokio = { version = "1", features = ["full"] }
tokio-openssl = "0.6"
+1 -1
View File
@@ -7,7 +7,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
rustls-pemfile = "0.3"
tokio = { version = "1", features = ["full"] }
tokio-rustls = "0.23"
+1 -1
View File
@@ -6,7 +6,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util", "filter"] }
tracing = "0.1"
@@ -6,7 +6,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = "0.14"
hyper = "1.0.0-rc.3"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
+1 -1
View File
@@ -7,7 +7,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
futures = "0.3"
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
prost = "0.11"
tokio = { version = "1", features = ["full"] }
tonic = { version = "0.8" }
+1 -1
View File
@@ -5,5 +5,5 @@ edition = "2021"
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1", features = ["full"] }
+1 -1
View File
@@ -7,6 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum", features = ["ws"] }
futures = "0.3"
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tokio-tungstenite = "0.17"
+1 -1
View File
@@ -6,7 +6,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
mime = "0.3"
serde_json = "1.0"
tokio = { version = "1.0", features = ["full"] }
+1 -1
View File
@@ -7,7 +7,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
futures = "0.3"
hyper = { version = "0.14", features = ["full"] }
hyper = { version = "1.0.0-rc.3", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tracing = "0.1"
+1 -1
View File
@@ -7,7 +7,7 @@ version = "0.1.0"
[dependencies]
async-trait = "0.1.67"
axum = { path = "../../axum" }
http-body = "0.4.3"
http-body = "1.0.0-rc.2"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0.29"
tokio = { version = "1.0", features = ["full"] }