Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 1, 2026·3 min de lecture

Tide — Async Web Framework for Rust

Tide is an asynchronous web framework for Rust that provides a minimal, composable API inspired by Express and Koa for building HTTP servers with async/await and the async-std runtime.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Tide Rust Framework
Commande d'installation directe
npx -y tokrepo@latest install 47377ef8-7569-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Tide is an async web framework for Rust built on the async-std runtime. It provides a small, composable API for defining HTTP endpoints with middleware, state management, and streaming support. Tide aims to make async Rust web development approachable by offering a clean, Express-inspired interface.

What Tide Does

  • Defines HTTP routes with async handler functions that return Result types
  • Supports middleware composition for logging, CORS, sessions, and error handling
  • Manages application state via a shared State type available in all handlers
  • Handles streaming request and response bodies for large payloads
  • Provides built-in support for JSON, form data, and file serving

Architecture Overview

Tide is built on async-std and http-types. Requests flow through a middleware stack, then match against a route trie. Each handler receives a Request object containing the shared application state, extracts parameters or body data, and returns a Response. The framework is single-threaded per listener by default but can be wrapped in multi-listener setups for concurrency.

Self-Hosting & Configuration

  • Requires Rust 1.65+ with the 2021 edition
  • Add tide and async-std to Cargo.toml dependencies
  • Initialize with tide::new() or tide::with_state(state) for shared state
  • Bind to address with app.listen("0.0.0.0:8080").await
  • Deploy as a compiled binary; pair with a reverse proxy for TLS

Key Features

  • Clean async/await API reduces the complexity of asynchronous Rust code
  • Shared application state is type-safe and available in every handler
  • Middleware is composable with before, after, and around hooks
  • Nested routes and route prefixes keep endpoint definitions organized
  • Server-Sent Events support for real-time push from server to client

Comparison with Similar Tools

  • Actix Web — more mature with higher throughput; Tide prioritizes API simplicity
  • Axum — Tokio-based with extractor pattern; Tide uses async-std runtime
  • Rocket — macro-driven with compile-time checks; Tide is more lightweight
  • Warp — filter-based composition; Tide uses traditional route-and-handler style
  • Poem — feature-rich with OpenAPI support; Tide is more minimal

FAQ

Q: Why does Tide use async-std instead of Tokio? A: Tide was built by the async-std team as a showcase for the runtime. It embraces async-std's task model and I/O traits.

Q: Is Tide production-ready? A: Tide is usable for production workloads but has not reached 1.0. Evaluate stability requirements before choosing it for critical services.

Q: Can I use Tide with Tokio? A: Tide is designed for async-std. For Tokio-based projects, Axum or Actix Web are better fits.

Q: Does Tide support WebSockets? A: WebSocket support is available via the tide-websockets crate as a middleware extension.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires