qmetrics.net

gRPC Rust

Async gRPC client and server library for Rust

gRPC Rust screenshot

tonic implements gRPC over HTTP/2 in Rust with async/await. It includes transport, codegen from protobuf, and optional health and reflection helpers.

Overview

tonic is a Rust library for building gRPC services and clients that speak HTTP/2. It targets production use with first-class async/await support and is positioned as a core building block for networked Rust systems.

The design splits a generic gRPC layer from a concrete HTTP/2 stack built on hyper and tokio, plus codegen driven by prost to generate clients and servers from protobuf definitions. Features called out in the docs include bidirectional streaming, TLS via rustls, load balancing, custom metadata, authentication, and standard health checking.

Companion crates cover build-time service generation, well-known gRPC types, a health-check service implementation, and server reflection. Tutorials and example projects walk through helloworld and richer routeguide-style APIs, with interop samples for advanced gRPC behavior.

Some build APIs rely on the protoc compiler when compiling protobuf sources. The project is licensed under MIT and maintained as part of the broader gRPC ecosystem for Rust.

Key features

  • Bidirectional streaming RPCs
  • Async HTTP/2 transport on hyper
  • Protobuf codegen via prost
  • TLS support with rustls
  • Load balancing and custom metadata
  • Authentication hooks
  • gRPC health checking helper
  • Server reflection crate

Use cases

  • Rust microservices exposing gRPC APIs
  • Calling remote gRPC backends from Rust
  • Streaming RPC workloads
  • Interop with other gRPC implementations
  • Production HTTP/2 services in tokio

Tags

Similar software

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

OkHttp

HTTP client for JVM, Android, and GraalVM

OkHttp is an HTTP client library tuned for efficient networking on Android, Java, and GraalVM native images. It offers synchronous and asynchronous call APIs with a fluent request builder.

★ 47.1k⟳ yesterdayApache-2.0
Frameworks & PlatformsDesktop/CLI app

gRPC

Cross-language remote procedure call framework

gRPC is an RPC framework that lets client and server programs communicate transparently and supports building connected, multi-language systems.

★ 45.5k⟳ todayApache-2.0

tRPC

End-to-end typesafe TypeScript APIs without code generation

tRPC helps teams define server procedures and call them from clients with full TypeScript types for inputs, outputs, and errors—no schemas or codegen step.

★ 40.9k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

go-zero

Cloud-native Go microservices and RPC framework

go-zero is a Go web and RPC framework with code generation, built-in resilience middleware, and tooling aimed at stable high-traffic services.

★ 33.5k⟳ 9 days agoMIT