Closed pbspbsingh closed 2 years ago
Lately Axum has modified the internal implementation of Router and they have started boxing the routers by default (https://github.com/tokio-rs/axum). Unfortunately these new changes don't work with axum_server. I get following compilation error:
Router
axum_server
error[E0277]: `(dyn axum::clone_box_service::CloneService<axum::http::Request<axum::body::Body>, Response = axum::http::Response<http_body::combinators::box_body::UnsyncBoxBody<bytes::Bytes, axum::Error>>, Error = Infallible, Future = Pin<Box<(dyn futures_util::Future<Output = Result<axum::http::Response<http_body::combinators::box_body::UnsyncBoxBody<bytes::Bytes, axum::Error>>, Infallible>> + std::marker::Send + 'static)>>> + std::marker::Send + 'static)` cannot be shared between threads safely
See #23.
Keep this issue open until resolved. :+1:
Thanks for the prompt response.
Updated yesterday. Version 0.3 works with axum.
0.3
axum
Lately Axum has modified the internal implementation of
Router
and they have started boxing the routers by default (https://github.com/tokio-rs/axum). Unfortunately these new changes don't work withaxum_server
. I get following compilation error: