axum
axum copied to clipboard
Make `serve` generic over the listener and IO types
Based on https://github.com/tokio-rs/axum/pull/2478
Fixes https://github.com/tokio-rs/axum/issues/2474
It's actually not as bad as I had feared so I think we can do this for 0.8.
Just wanted to add a friendly +1 to these changes — this is precisely a fit for something I'm working on right now, and would make life dramatically easier as compared with the boilerplate currently necessary to do this manually.
Is any help needed to bring this change over the finish line?
Is any help needed to bring this change over the finish line?
Nope. Its a breaking change and don't wanna start merging breaking PRs just yet. It is done otherwise.
Is any help needed to bring this change over the finish line?
I'm not involved with the project, but seeing as this is a breaking change, it's slotted for 0.8 as far as I can tell, so not sure how soon it will be until this is merged.
As a workaround for myself, I cloned the project and merged this PR specifically into the latest version. If it's viable to use for your situation, you can patch it in via the below snippet. I'm using this in prod with no issues, but YMMV obviously.
# in your Cargo.toml
[patch.crates-io]
axum = { git = "https://github.com/lojewalo/axum.git", branch = "uds-v0.7.3" }
Thanks for doing that @lojewalo, I'll do that, and I'll report if I run into any sharp edges. Thanks for everyone's work on such an awesome library! 😎
I came here via the issue #2494. If this makes it easier to accept tls connections, could you also provide an example how to do it without the axum-server crate?
I am at the moment a bit frustrated about the slow maintenance of the axum-server crate and would prefer to avoid depending on it.
Any updates on where this stands with the maintainers? do you want to experiment with different designs or can this be merged as-is? This also solves for me a case of listening over VSOCK with something a little bit different than the regular TCP syscall-flow
This is a PR by the primary maintainer, approved by the co-maintainer. It's going to land, the question is just when. Which I unfortunately can't give you any details about, you're just going to have to be patient (or use this branch via [patch]).
This PR is added to 0.8 milestone. Will it land when 0.8 publishes?
Yes. It will be merged some time before we publish v0.8.0.
Closing in favor of #2941.