tonic icon indicating copy to clipboard operation
tonic copied to clipboard

Update to hyper 1.0 and axum 0.7

Open ikrivosheev opened this issue 1 year ago • 2 comments

Hello! This is continue for: https://github.com/hyperium/tonic/pull/1583

Also I merged:

  • https://github.com/allan2/tonic/pull/1
  • https://github.com/allan2/tonic/pull/2

TODO:

  • [x] update imports to use -util crates
  • [x] update AddrStream and AddrIncoming
  • [ ] use axum Request and Response in transport (in-progress)
  • [ ] add poll_frame to impl http_body::Body (in-progress)
  • [ ] remove poll_trailers from impl http_body::Body (in-progress)
  • [x] fix hyper-timeout connector
  • [ ] fix connect, Connect (no more hyper::client::service::Connect)
  • [ ] update version, docs
  • [ ] update examples
  • [ ] many more (tonic-web, etc. Some of these will be in separate PRs)

Depends on:

  • [ ] https://github.com/hyperium/hyper/issues/3461

Closed: https://github.com/hyperium/tonic/issues/1579

ikrivosheev avatar Jan 10 '24 16:01 ikrivosheev

Well, now I understand. I need to re-implement two structs:

  1. https://docs.rs/hyper/0.14.27/hyper/client/service/struct.Connect.html
  2. https://docs.rs/hyper/0.14.27/hyper/client/conn/struct.SendRequest.html

And Channel will start to compile. Great, small, but progress))

ikrivosheev avatar Jan 15 '24 07:01 ikrivosheev

Maybe it will be useful in hyper-utils.

ikrivosheev avatar Jan 15 '24 07:01 ikrivosheev

@ikrivosheev do you plan on continuing with this PR?

jakubadamw avatar Mar 10 '24 16:03 jakubadamw

@ikrivosheev do you plan on continuing with this PR?

@jakubadamw , hello! Yes, I do. At the moment I need to finish tasks in hyper-util (https://github.com/hyperium/hyper/issues/3080)

ikrivosheev avatar Mar 10 '24 17:03 ikrivosheev

@ikrivosheev is there anyway I can help in pushing this forward?

rakshith-ravi avatar Mar 27 '24 09:03 rakshith-ravi

@ikrivosheev is there anyway I can help in pushing this forward?

Hello! For the PR needs something like: https://docs.rs/hyper/0.14.28/hyper/client/service/struct.Connect.html. A service which return a service https://docs.rs/hyper/0.14.28/hyper/client/conn/struct.SendRequest.html for make http request.

ikrivosheev avatar Mar 27 '24 12:03 ikrivosheev

From my understanding this PR will unlock upgrading to rustls 0.23 as hyper_rustls 0.27 uses hyper 1.0.

stormshield-gt avatar Mar 28 '24 14:03 stormshield-gt

Hello! For the PR needs something like: https://docs.rs/hyper/0.14.28/hyper/client/service/struct.Connect.html. A service which return a service https://docs.rs/hyper/0.14.28/hyper/client/conn/struct.SendRequest.html for make http request.

hyper-util can help us here. Can we consider using some of those structs?

rakshith-ravi avatar Mar 28 '24 14:03 rakshith-ravi

Hello! For the PR needs something like: https://docs.rs/hyper/0.14.28/hyper/client/service/struct.Connect.html. A service which return a service https://docs.rs/hyper/0.14.28/hyper/client/conn/struct.SendRequest.html for make http request.

hyper-util can help us here. Can we consider using some of those structs?

Yes, I saw it. But there aren't structures like in the old hyper version.

ikrivosheev avatar Mar 28 '24 21:03 ikrivosheev

I think I got the SendRequest and Connection pieces working in #1670, but I'm running into what I think is a compiler error.

In that PR I still want to finish handling poll_frame and properly add graceful shutdowns (both things I punted on while just trying to get tonic to compile)

alexrudy avatar Mar 31 '24 15:03 alexrudy

I really appreciate you guys working on this. I am looking forward to multiplexing Axum and Tonic in my current project. Right now I have strict dependencies on Hyper 1.0+ and Axum 0.7+.

If there is anything I can do to help out please let me know.

LockedThread avatar Mar 31 '24 16:03 LockedThread