programatik29 / axum-server

High level server designed to be used with axum framework.
MIT License
177 stars 63 forks source link

axum_server doesn't work with unreleased version of axum (0.3.0) #24

Closed pbspbsingh closed 2 years ago

pbspbsingh commented 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:

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
programatik29 commented 2 years ago

See #23.

programatik29 commented 2 years ago

Keep this issue open until resolved. :+1:

pbspbsingh commented 2 years ago

Thanks for the prompt response.

programatik29 commented 2 years ago

Updated yesterday. Version 0.3 works with axum.