diff --git a/Cargo.toml b/Cargo.toml index 0083b7de..71d41cc9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,8 +82,8 @@ headers = "0.4" http = "1.1" http-body = "1" http-body-util = "0.1" -hyper = { version = "1.3", features = ["server"] } -hyper-util = { version = "0.1.3", features = ["server-auto", "tokio"] } +hyper = { version = "1.3" } +hyper-util = { version = "0.1.4", features = ["tokio", "server"] } mime = "0.3" mime_guess = "2.0" percent-encoding = "2.3" @@ -118,7 +118,7 @@ tower = "0.4" tower-http = "0.5" # Soml -async-channel = "2.2" +async-channel = "2.3" async-executor = "1.11" async-io = "2.3" async-net = "2.0" diff --git a/examples/otel/tracing/Cargo.toml b/examples/otel/tracing/Cargo.toml index 61a854e3..2456589c 100644 --- a/examples/otel/tracing/Cargo.toml +++ b/examples/otel/tracing/Cargo.toml @@ -9,5 +9,5 @@ viz = { workspace = true, features = ["otel-tracing"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } opentelemetry.workspace = true -opentelemetry-otlp = { version = "0.15", default-features = false, features = ["trace", "http-proto"] } opentelemetry_sdk = { workspace = true, features = ["trace", "rt-tokio-current-thread"] } +opentelemetry-otlp = { version = "0.16", default-features = false, features = ["trace", "http-proto"] } diff --git a/viz-smol/Cargo.toml b/viz-smol/Cargo.toml index 60a75e89..151e97d5 100644 --- a/viz-smol/Cargo.toml +++ b/viz-smol/Cargo.toml @@ -44,8 +44,8 @@ session = ["cookie", "cookie-private", "viz-core/session"] csrf = ["cookie", "cookie-private", "viz-core/csrf"] cors = ["viz-core/cors"] -http1 = ["hyper/http1"] -http2 = ["hyper/http2"] +http1 = ["dep:hyper", "hyper?/http1", "hyper-util?/http1"] +http2 = ["dep:hyper", "hyper?/http2", "hyper-util?/http2"] unix-socket = [] @@ -64,8 +64,9 @@ viz-router.workspace = true viz-handlers = { workspace = true, optional = true } viz-macros = { workspace = true, optional = true } -hyper.workspace = true -hyper-util.workspace = true +hyper = { workspace = true, optional = true } +hyper-util = { workspace = true, optional = true } + tracing.workspace = true async-executor.workspace = true diff --git a/viz-smol/src/server.rs b/viz-smol/src/server.rs index 82ae523f..f73a5bea 100644 --- a/viz-smol/src/server.rs +++ b/viz-smol/src/server.rs @@ -3,6 +3,7 @@ use std::{borrow::Borrow, fmt::Debug, io, sync::Arc}; use async_executor::Executor; use futures_lite::io::{AsyncRead, AsyncWrite}; use hyper::rt::Timer; +#[cfg(any(feature = "http1", feature = "http2"))] use hyper_util::server::conn::auto::Builder; use smol_hyper::rt::{FuturesIo, SmolExecutor, SmolTimer}; diff --git a/viz/Cargo.toml b/viz/Cargo.toml index d2a7245c..3318cec9 100644 --- a/viz/Cargo.toml +++ b/viz/Cargo.toml @@ -51,8 +51,8 @@ cors = ["viz-core/cors"] compression = ["viz-core/compression"] -http1 = ["hyper/http1", "hyper-util/http1"] -http2 = ["hyper/http2", "hyper-util/http2"] +http1 = ["dep:hyper", "dep:hyper-util", "hyper?/http1", "hyper-util?/http1"] +http2 = ["dep:hyper", "dep:hyper-util", "hyper?/http2", "hyper-util?/http2"] unix-socket = [] @@ -76,8 +76,8 @@ viz-router.workspace = true viz-handlers = { workspace = true, optional = true } viz-macros = { workspace = true, optional = true } -hyper.workspace = true -hyper-util.workspace = true +hyper = { workspace = true, optional = true } +hyper-util = { workspace = true, optional = true } futures-util = { workspace = true, optional = true } tracing.workspace = true diff --git a/viz/src/server.rs b/viz/src/server.rs index cc9937ba..7a9e46c3 100644 --- a/viz/src/server.rs +++ b/viz/src/server.rs @@ -7,6 +7,7 @@ use std::{ }; use hyper_util::rt::{TokioExecutor, TokioIo}; +#[cfg(any(feature = "http1", feature = "http2"))] use hyper_util::server::conn::auto::Builder; use tokio::{ io::{AsyncRead, AsyncWrite},