Repository navigation
v2.3.0
Tako 2.3.0 serves W3C WebTransport sessions that browsers can connect to, makes streaming gRPC a stable API, and runs every transport on both Tokio and Compio. It also fixes unary gRPC replies for grpc-go based clients such as grpcurl, and removes the outbound HTTP client.
This release includes breaking changes. Read the 2.3 migration guide before upgrading from 2.2.x. All eight workspace crates are versioned together at 2.3.0 and require Rust 1.95 or newer.
Breaking changes and migration
tako::client(TakoClient,TakoTlsClient,V2Client) and theclientandnative-certsfeatures were removed. Use reqwest or ureq for outbound HTTP.- The
webtransportfeature now enableshttp3, and with it QUIC datagrams are always on:ServerConfig::h3_enable_datagrams = falseno longer disables them. GrpcServerStreamhas a new publicdeadlinefield. Struct literals needdeadline: None;GrpcServerStream::newis unaffected.
Added
- W3C WebTransport on the HTTP/3 server, on Tokio and Compio. A
CONNECTroute takes theWebTransportextractor and returnson_session, so the router and its middleware see the request before the session starts.WebTransportSessionoffers bidirectional and unidirectional streams, datagrams,close(code, reason), andclosed(). The session driver watches the CONNECT stream, so a browser'stransport.close()reaches the server within milliseconds instead of at the QUIC idle timeout. Tested against Chrome and thewtransportclient.RawQuicSessionstays as a Tokio-only raw QUIC helper. - Stable streaming gRPC: server streaming with
GrpcServerStream, client streaming withGrpcClientStream, and bidirectional streaming withGrpcBidi::respond.Option<GrpcDeadline>extracts the client'sgrpc-timeoutandwith_deadlineenforces it;From<GrpcError> for GrpcStatuslets handlers use?, andGrpcStatusis a responder for trailers-only errors. Every RPC shape is tested against a tonic client on both runtimes. - Every transport on Compio: h2c, Unix sockets, PROXY protocol v1/v2, HTTP/3 (over compio-quic), and WebTransport, through
CompioServer::try_spawn_h2c,try_spawn_unix_http,try_spawn_proxy_protocol, andtry_spawn_h3. - Examples:
examples/webtransport(a browser demo usingserverCertificateHashes, no certificate to install),examples/grpc-streaming, andexamples/raw-quic(the previous WebTransport example).
Fixed and improved
- Unary gRPC replies send
grpc-statusin the HTTP/2 trailers. Before, grpc-go based clients failed withserver closed the stream without sending trailers. GrpcRequestreads only as far as the first message and rejects messages overMAX_GRPC_MESSAGE_SIZEbefore buffering them, instead of collecting the whole request body.- A
GrpcServerStreamends at its firstErr, and later items are no longer sent after the status trailers. Messages that are ready together share DATA frames of up to 32 KiB, which also keeps recenth2clients from closing the connection over too many small frames. - The gRPC request decoder reports a truncated message once and stops after the first error instead of repeating it.
build_rustls_server_configinstalls aws-lc-rs as the process-wide rustls provider when none is installed, so builds that compile both ring and aws-lc-rs, such as withhttp3, no longer panic at startup.#[tako::route]expansions no longer triggerunreachable_codewarnings for path parameters whose parse error is uninhabited, such asString.- Documentation:
llms.txtandllms-full.txt, a Markdown version of every page, a comparison with Axum and Actix Web, a Coming from Axum guide, and guides for WebTransport and streaming gRPC.
Full diff: v2.2.0...v2.3.0