#2790·grpc-rust

Single Threaded Tonic Client/Server

Author: artsiomkaltovichCreated Aug 4, 2026Updated Aug 7, 2026

Feature Request

Motivation

Tonic requires Send + Sync for the client code, that make it hard to introduce to single-threaded async code. Not every service should be multi-threaded and now adding tonic in single threaded code could be painful. This topic was raised several times:

Single threaded server example with async_trait(?Send) (open): https://github.com/grpc/grpc-rust/issues/2171 how to generate trait with #[async_trait(?Send)] (closed): https://github.com/grpc/grpc-rust/issues/844 feat: Support thread-local functionality (closed PR): https://github.com/grpc/grpc-rust/pull/1505 add Single-threaded runtime (closed): https://github.com/grpc/grpc-rust/issues/784

however, it wasn't fully implemented yet.

Proposal

I think ability to run tonic natively in single-threaded without send+sync addition would benefit the community a lot.

To be honest I haven't check the src yet. There were suggestions to replace async_trait with async_trait(?Send) another approach is code split and introducing local versions for code (with/or without feature flag).