Migrating to 2.3
Replace the removed outbound HTTP client, review the WebTransport and gRPC changes, and use the Compio transports added in Tako 2.3.
Tako 2.3.0 removes the outbound HTTP client, adds W3C WebTransport and stable streaming gRPC, and brings every transport to Compio. Most applications only need the first section. See the release notes for the complete list.
The outbound HTTP client is gone
The tako::client module (TakoClient, TakoTlsClient, V2Client) and the
client and native-certs features were removed. A build that still enables them
fails with an unknown-feature error. Use a dedicated client instead:
reqwest for async code or
ureq for blocking code.
WebTransport
The webtransport feature now serves W3C WebTransport sessions on the HTTP/3
server, on both runtimes, and browsers can connect to it. A session starts as a
CONNECT route that takes the WebTransport extractor; see
WebTransport.
webtransportnow enableshttp3.- With
webtransport, QUIC datagrams are always on;ServerConfig::h3_enable_datagrams = falseno longer turns them off. RawQuicSessionandserve_webtransportare unchanged and stay Tokio-only. The raw QUIC example moved fromexamples/webtransporttoexamples/raw-quic;examples/webtransportis now a browser demo.
gRPC
GrpcServerStreamhas a new publicdeadlinefield. A struct literal needsdeadline: None;GrpcServerStream::new(stream)is unaffected.- The first
Erritem of aGrpcServerStreamends the call, and later items are no longer sent. Messages that are ready together share one HTTP/2 DATA frame. - A successful unary reply sends
grpc-statusin the HTTP/2 trailers instead of the response headers. grpc-go based clients, including grpcurl, rejected the old replies withserver closed the stream without sending trailers. GrpcRequestreads only as far as the first message, capped atMAX_GRPC_MESSAGE_SIZE, instead of buffering the whole request body.- New: the
Option<GrpcDeadline>extractor andwith_deadline,StreamforGrpcClientStreamandGrpcBidi,GrpcBidi::respond,From<GrpcError> for GrpcStatus, andGrpcStatusas a responder. See gRPC.
Compio
h2c, Unix sockets, PROXY protocol, HTTP/3, and WebTransport now run on Compio.
CompioServer has the same try_spawn_h2c, try_spawn_unix_http,
try_spawn_proxy_protocol, and try_spawn_h3 methods as Server, and
tako::server_unix and tako::proxy_protocol are available with compio.
UnixPeerAddr moved to tako::conn_info and is still re-exported from
tako::server_unix.
build_rustls_server_config now installs aws-lc-rs as the process-wide rustls
provider when none is installed. Builds that compile both ring and aws-lc-rs, for
example with http3, no longer panic at startup.
Last updated on