Search tools, AI agents, MCP servers
Submit a tool

Search iThub

Search tools, categories and collections. Type at least two characters.

Explore all tools
↑ ↓ to explore resultsEnter to open · Esc to close
W

warp

Rust web server framework built on hyper, with composable Filters for routing, bodies and WebSockets

Web Frameworks & UI LibrariesOpen sourcev0.4.1

warp at a glance

Pricing
Open source
Deployment
Self-hosted
License
Open source
Version
v0.4.1August 6, 2025
Language
Rust
Data location
warp is a library compiled into the developer's own Rust application and runs wherever that application is deployed; the project operates no hosted service and receives no application data.
Maker
seanmonstar
Founded
2018

What is warp?

warp is a web server framework for the Rust programming language, published as the warp crate under the MIT license. It was announced on August 1, 2018 in the introductory blog post by Sean McArthur, who presented it as a joint project with Carl Lerche, and the repository is hosted at seanmonstar/warp on GitHub. The project describes itself as a super-easy, composable web server framework. It should not be confused with the Warp terminal application, which is a separate product.

The central concept is the Filter trait. A filter extracts data from a request or rejects it, and filters are combined with methods such as and, or, map and and_then to describe routes, so path segments, headers, query strings and bodies are all expressed the same way. warp is built on hyper and runs on the Tokio runtime, which gives it HTTP/1 and HTTP/2 support and asynchronous request handling. The crate is added to a project's Cargo.toml together with Tokio; there are no binaries or hosted service, and the API reference is published on docs.rs with runnable programs in the examples folder.

The current crate version is warp 0.4.4, published on crates.io on November 13, 2026 and tagged v0.4.4 in the repository. The release marked Latest on the GitHub releases page is still v0.4.1 of August 2025, because later versions were published as tags and crates without GitHub release entries. According to the changelog, 0.4.4 strips line endings from user input passed to server-sent event types and normalizes an absent path_and_query to the root path. Version 0.4.3 of May 2026 brought back the addr::remote() filter from 0.3.x, added a reply::stream() helper and fixed a CORS error when the request-method header was missing, and 0.4.2 added support for passing a UnixListener to incoming().

Version 0.4.0, released on August 5, 2025, was a breaking release. It moved warp to version 1 of hyper, http and http-body, made the multipart and websocket features opt-in, placed warp::serve() behind a server feature and warp::test behind a test feature, and removed the tls feature and its types. Since then no Cargo feature is enabled by default, so the README dependency line is warp = { version = "0.4", features = ["server"] }. Built-in TLS is no longer part of the crate; the TLS feature is commented out in the manifest with a note that it might come back.

warp is a library rather than a full-stack framework: it includes no ORM, template engine or authentication system, and the examples show integrations such as Handlebars templates added as separate crates. Community discussion takes place on the project's Discord server and in GitHub issues. Other HTTP frameworks on iThub include Gin for Go; further frameworks are grouped under Web Frameworks & UI Libraries.

Key capabilities

  • Crate installation Warp is added in Cargo.toml next to Tokio, for example tokio = { version = "1", features = ["full"] } and warp = { version = "0.4", features = ["server"] }. The crate uses Rust edition 2021, and the result is a normal Rust binary with no separate runtime or service.
  • Cargo features Since 0.4.0 the default feature set is empty. server enables warp::serve() and the hyper server stack, websocket adds WebSocket support through tokio-tungstenite, multipart adds multipart form parsing through multer, compression enables gzip, deflate and Brotli filters, and test enables the testing module. Without server, the 0.4.2 release reduced the pulled-in dependencies.
  • Filter composition Every route is built from Filter values combined with and, or, map, and_then, untuple_one and similar combinators. Values extracted by each filter are passed as typed arguments to the handler, so a path parameter, a header and a JSON body arrive as Rust values. The crate documentation describes how unmatched filters reject a request so that the next alternative can be tried.
  • Path routing The path! macro and the path module match literal segments, typed parameters with param, the end of the path with end, and the remaining path with tail, peek or full. The README example warp::path!("hello" / String) matches GET /hello/warp and passes the name to the handler.
  • Methods, headers, cookies and host Method filters cover GET, POST, PUT, DELETE, HEAD, OPTIONS and PATCH. Header filters extract a typed header, an optional one or a full header map, or require an exact value, with a case-insensitive variant. Cookie filters read required or optional cookies, and host filters match the request authority.
  • Query strings and bodies query deserializes the query string into a type with serde, and query::raw returns it unparsed. Body filters read JSON and URL-encoded forms into serde types, return raw bytes, aggregate the body or expose it as a stream, and content_length_limit rejects bodies above a set size.
  • Multipart form data With the multipart feature, warp::multipart::form() parses multipart uploads into parts with names, filenames and content types. Since 0.3.4 part data is streamed rather than buffered, and the maximum length can be set or disabled with max_length().
  • Static files and directories warp::fs::file serves a single file and warp::fs::dir serves a directory tree, as shown in the file.rs and dir.rs examples. MIME types are derived from file extensions through the mime_guess crate.
  • WebSockets The ws() filter, available with the websocket feature, upgrades a request and hands the connection to an async handler as a stream and sink of messages. The repository includes a basic echo example and a multi-user chat example.
  • Server-sent events The sse module turns a stream of events into an event-stream response, with keep_alive for periodic comments and last_event_id to read the reconnection header. The 0.4.4 release strips line endings from user input placed in SSE fields, and the examples include a basic SSE stream and an SSE chat.
  • Replies and redirects Handlers return any type that implements Reply, including strings, JSON from reply::json, HTML from reply::html and wrappers that set a status code or headers. reply::stream() was added in 0.4.3, and the redirect module builds 301, 302, 303, 307 and 308 responses.
  • Rejections and error handling When no filter matches, warp produces a Rejection, and recover turns rejections into custom responses such as JSON error bodies. Custom rejection types can be defined for application errors, as shown in the rejections.rs example.
  • CORS warp::cors() builds a CORS filter with allowed origins, methods, headers and credentials, and handles preflight requests. The 0.4.3 release fixed a case where an error was returned when the request-method header was missing.
  • Compression With the compression feature, the gzip(), deflate() and brotli() wrappers compress responses through the async-compression crate. The compression.rs example applies them to file responses.
  • Logging and tracing warp::log writes access log lines through the log crate, and log::custom accepts a callback with request information. The trace filters create tracing spans for requests or named routes, as shown in the tracing.rs example.
  • Server, graceful shutdown and listeners warp::serve(filter).run(addr) binds and serves on a socket address. bind plus graceful(signal) adds graceful shutdown, which 0.4.1 fixed so the filter no longer has to be a future. incoming() accepts an existing listener, including a UnixListener since 0.4.2, and addr::remote() exposes the peer address again since 0.4.3.
  • Use with other hyper services warp::service() converts a filter into a service that can be driven by hyper directly, for applications that set up their own server or combine warp routes with other services. warp re-exports http and hyper for this purpose.
  • Testing module With the test feature, warp::test builds mock requests with a method, path, headers and body and runs them through a filter without opening a socket. It can also test WebSocket filters, which lets route logic be checked in ordinary Rust unit tests.

Where warp fits

JSON APIs

The todos.rs example builds a small REST API with list, create, update and delete routes over an in-memory store. Routes combine method filters, path parameters, query for pagination options and body::json with a content_length_limit, then return reply::json or a status code. The example also shows how shared state is passed into handlers through a filter.

Serving a static site or single-page app

The dir.rs and file.rs examples serve a directory and an index file with fs::dir and fs::file. Combined with or, a project can serve API routes under a prefix and static assets for every other path, and add the compression wrappers when the compression feature is enabled.

Real-time features with WebSockets and SSE

The websockets_chat.rs and sse_chat.rs examples implement chat rooms, one over WebSocket connections and one over server-sent events with a POST route for new messages. Both keep connected users in shared state and broadcast messages to them, and the WebSocket example needs the websocket feature.

File uploads

The multipart.rs example reads multipart form data with multipart::form() and iterates over the parts, which arrive as streams since 0.3.4. A maximum length can be set on the form, and max_length(None) removes the limit.

Request logging and diagnostics

The tracing.rs example wraps routes in warp::trace to emit spans through the tracing ecosystem, with named spans for individual routes, while warp::log produces access logs through the log crate. The rejections.rs example shows mapping rejections and custom errors to JSON responses with proper status codes.

Upgrading from 0.3 to 0.4

The 0.4.0 changelog lists the steps a 0.3 project meets when upgrading: enabling the server feature for warp::serve, adding websocket, multipart or test where those modules are used, moving to hyper 1 types, and replacing the removed built-in TLS with TLS termination outside warp. The addr::remote() filter removed in 0.4.0 returned in 0.4.3.

Reviews of warp

No reviews yet

Be the first to share your experience with warp.

Loading review form…

Found warp useful? Upvote it todayYour vote helps other IT teams find it in the daily ranking.

Similar to warp

Compare:warp vs Ginwarp vs Flutterwarp vs Rune

  1. GinMIT-licensed HTTP web framework for Go with a radix tree router, middleware, binding and renderingWeb Frameworks & UI Libraries0 views
  2. FlutterGoogle's open-source UI SDK for building Android, iOS, web, Windows, macOS and Linux apps from one Dart codebaseWeb Frameworks & UI Libraries0 views
  3. RuneRust UI framework with its own GPU renderer, text, layout and springs for desktop, iOS and webWeb Frameworks & UI Libraries152 views
  4. RefineMIT-licensed headless React framework for admin panels, dashboards, internal tools and B2B appsWeb Frameworks & UI Libraries51 views
  5. Next.jsMIT-licensed React framework with App Router, Server Components, Turbopack and self-hosting optionsWeb Frameworks & UI Libraries44 views
  6. SvelteKitWeb application framework built on SvelteWeb Frameworks & UI Libraries31 views
  7. RemixFull-stack TypeScript framework on Web APIs: routing, data, auth, sessions, UI and assets in one remix packageWeb Frameworks & UI Libraries30 views
  8. AstroWeb framework for content-driven sites with zero JS by defaultWeb Frameworks & UI Libraries26 views