Tower

Modular, reusable Rust components for building async network clients and servers

Library
Cargo
v0.5.3
4,287stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
55/100Fair
Development Activity24
Maintenance24
Community72
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture85
Code Quality80
Innovation78
Learning Curve60

Tower is a library of protocol-agnostic middleware built around a single trait — Service, an async function from Request to Result<Response, Error> — that lets you compose cross-cutting concerns like timeouts, retries, load balancing, rate limiting, and buffering as small, independently testable Layers stacked around any client or server.

Because the abstraction is just a function from request to response, the same middleware stack works whether you’re building an HTTP client, a gRPC server, or any other request/response protocol; Tower underpins higher-level frameworks like Axum, Tonic, and Hyper’s ecosystem rather than being an application framework itself.

What You Get

  • The Service trait: an async function from Request to Result<Response, Error> that any client or server can implement
  • The Layer trait for composing middleware into reusable, stackable wrappers around a Service
  • Ready-made middleware: timeout, retry, load_shed, limit (concurrency/rate), balance (load balancing), buffer, hedge, filter, reconnect, and steer
  • tower-service and tower-layer are no_std compatible, so the core traits can be used in constrained environments
  • tower-test utilities for unit-testing services and middleware in isolation

Common Use Cases

  • Adding timeouts, retries, and rate limiting to an HTTP or gRPC client without hand-rolling each concern
  • Building a load-balancing client that distributes requests across multiple backend connections
  • Composing middleware stacks underneath web frameworks like Axum or RPC frameworks like Tonic
  • Writing protocol-agnostic middleware once and reusing it across different network protocols

Under The Hood

Architecture - the workspace splits the abstraction from the implementation: tower-service defines the minimal Service trait (no_std, #![forbid(unsafe_code)]), tower-layer defines the Layer composition trait, and the top-level tower crate provides the actual middleware implementations (balance, buffer, discover, filter, hedge, limit, load, load_shed, ready_cache, reconnect, retry, spawn_ready, steer, timeout, util) plus a ServiceBuilder for stacking them, each middleware living in its own module so consumers can feature-gate in only what they use. Tech Stack - 100% Rust, no_std-compatible core traits with alloc, std-only middleware in the main crate, built on futures/tokio-style async primitives without depending on a specific runtime. Code Quality - the tower crate enforces missing_docs and missing_debug_implementations lint warnings and #![forbid(unsafe_code)] in tower-service, and ships a dedicated tower-test crate for exercising services in isolation, though the low commit velocity (activity_status: moderate, ~0.33 commits/month) reflects the crate’s foundational, mostly-stable nature rather than active feature growth. API Design - the entire library is built from two small traits (Service, Layer), which keeps the conceptual surface tiny and highly composable via ServiceBuilder, but the trait-based, generic-heavy design (especially around poll_ready/backpressure semantics) has a real learning curve for developers new to Rust’s async trait patterns.

Used by 23 apps in this directory

Rust
54%
Other

Cameleer

AI Agents

23

A local-first desktop workspace for managing AI agents in an enterprise-style workflow — agent directory, Kanban task tracking, workspace chat, and a full runtime/audit log of agent actions and tool approvals.

View details
41
Repo Health
65
Technical
76
Dependency
Built with
Rust54%
JavaScript24%
TypeScript15%
Updated 1 months ago
Go
59%
Apache 2.0

Cog

AI Development · Devops · Developer Tools

9,468

An open-source CLI that packages machine learning models into standard, production-ready Docker containers — no Dockerfile wrangling, no CUDA version hell.

View details
89
Repo Health
88
Technical
69
Dependency
Built with
Go59%
Rust17%
HTML13%
Updated 5 days ago
Svelte
46%
MIT

Cryptgeon

File Storage · Security

1,517

Self-destructing encrypted notes and files that vanish after viewing — the server never sees your keys.

View details
75
Repo Health
80
Technical
74
Dependency
Built with
Svelte46%
TypeScript30%
Rust14%
Updated yesterday
Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,816

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust28%
C23%
Updated yesterday
Rust
67%
Other

DefGuard

Security · Networking · Authentication

2,819

Self-hosted secure remote access that unifies WireGuard VPN, identity management, and connection-level MFA in one open-source platform.

View details
84
Repo Health
82
Technical
72
Dependency
Built with
Rust67%
TypeScript31%
Updated 3 days ago
Rust
87%
MIT

fabro

Developer Tools · Devops

1,571

Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.

View details
81
Repo Health
83
Technical
70
Dependency
Built with
Rust87%
Updated yesterday
Rust
67%
Other

GitButler

Developer Tools · Devops · AI Development

21,624

Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.

View details
89
Repo Health
84
Technical
67
Dependency
Built with
Rust67%
TypeScript20%
Svelte11%
Updated yesterday
Go
60%
MIT

hoop

Security · Monitoring

807

A wire-protocol gateway that enforces data masking, command blocking, approval workflows, and full session recording for engineers and AI agents accessing production infrastructure.

View details
85
Repo Health
80
Technical
64
Dependency
Built with
Go60%
Clojure19%
JavaScript14%
Updated 3 days ago
Rust
72%
Other

iii

Developer Tools · Devops

18,679

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
85
Repo Health
85
Technical
68
Dependency
Built with
Rust72%
TypeScript17%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search