tokio-networking

Implement Tokio-based HTTP and gRPC services with Tower middleware.

8|2|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/geoffjay/claude-plugins --skill tokio-networking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tokio-networking
Source: https://github.com/geoffjay/claude-plugins/tree/main/plugins/rust-tokio-expert/skills/tokio-networking
Command: npx skills add https://github.com/geoffjay/claude-plugins --skill tokio-networking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides network programming patterns for building production-grade services with the Tokio ecosystem.

Core Features & Use Cases

  • HTTP Service with Hyper and Axum: Build HTTP services with routing and middleware.
  • gRPC Service with Tonic: Build type-safe gRPC services.
  • Tower Middleware Composition: Layer middleware for cross-cutting concerns.
  • Observability: Add tracing and metrics using middleware layers.
  • Health Checks: Implement health endpoints and readiness checks.

Quick Start

Use the tokio-networking skill to scaffold a simple HTTP service with Axum and to set up a basic gRPC service using Tonic.

Frequently Asked Questions about tokio-networking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build HTTP services with Axum and Tokio?

HTTP services with Axum leverage Tokio's async runtime for type-safe routing and middleware composition. Axum provides extractors for request handling, built-in routing layers, and integration with Tower middleware for cross-cutting concerns like authentication and logging.

What's the best way to implement gRPC services in Rust?

Tonic provides type-safe gRPC service implementation on Tokio. Define services with protobuf, generate Rust code, and layer middleware via Tower for authentication, tracing, and error handling across RPC endpoints.

How do I add health checks and observability to async services?

Health checks and observability are implemented as Tower middleware layers. Add dedicated health endpoints for readiness checks, integrate tracing and metrics middleware to capture request flow, latency, and errors across HTTP and gRPC handlers.

Can I use middleware patterns across both HTTP and gRPC services?

Tower-based middleware composes across Hyper, Axum, and Tonic services. Implement middleware once as Tower layers—authentication, logging, connection pooling—and apply consistently to HTTP routes and gRPC method handlers.

How do I manage shared state in concurrent Tokio services?

Arc-based shared state enables type-safe concurrency in async handlers. Wrap state in Arc, pass to handlers via Axum extractors or Tonic service context, and rely on Rust's ownership system to prevent data races across concurrent requests.