Rust Axum is a Vercel starter template that deploys a Rust web application built on the Axum framework, showcasing streaming endpoints on the Vercel platform.
What is Rust Axum?
Rust Axum is a starter template published by Vercel that demonstrates how to run a Rust HTTP server using the Axum framework. It takes Rust source code and a vercel.json configuration as input and produces a deployed web application with three routes: a root page with an interactive HTML streaming interface, a /stream streaming endpoint, and a /users POST endpoint. The template lives in Vercel's public examples repository, alongside related Rust templates such as rust-hello-world, rust-websocket, and rust-wait-until.
Key Features
- Axum framework — Built on the Rust Axum web framework, an asynchronous HTTP server built on tokio and hyper.
- Streaming endpoint — The
/streamroute provides a streaming response for real-time data delivery. - Interactive HTML interface — The root route serves an interactive HTML page that lets users trigger and view streaming output in the browser.
- POST request handling — The
/usersroute accepts POST requests, demonstrating request body parsing. - Vercel deployment configuration — Includes
vercel.jsonwith routing and platform settings for the Vercel runtime. - Cargo dependency management —
Cargo.tomldefines the Rust dependencies and binary targets needed to build the Axum app. - Local development workflow — Install Rust, clone the examples repository, and run
vc devto test the application locally before deploying. - One-click deploy — The provided Deploy button on the template page starts a Vercel project preconfigured with the repository URL.
Who is it for?
Rust developers who want to deploy an Axum application to Vercel without setting up the project structure from scratch. Platform engineers evaluating streaming support in serverless Rust runtimes can use this template as a reference implementation. Teams adopting Rust for API backends can study the pattern for handling both streaming and POST routes in a single service.
What can you do with it?
- API developers: deploy a Rust Axum API with a
/usersendpoint that accepts POSTed JSON and a/streamendpoint for pushing live updates. - Frontend developers: use the provided interactive HTML page to test streaming responses directly in the browser without building a custom client.
- Infrastructure engineers: use the template as a baseline to add authentication, database connections, or other Axum middleware and redeploy to Vercel.
How does it work?
Clone the Vercel examples repository, navigate to rust/axum, install the Rust toolchain if needed, and run vc dev for a local development server. The project contains api/axum.rs, Cargo.toml, and vercel.json, which define the Axum app, its dependencies, and the Vercel deployment configuration respectively.
FAQ
Is Rust Axum free to use?
Yes, the template is part of Vercel's public examples repository, so the source code is freely available to clone, modify, and deploy under the repository's license.
What routes are included in the template?
The Axum application defines three routes: / serves an interactive HTML streaming interface, /stream is a streaming endpoint, and /users accepts POST requests.
How do I deploy this template?
Use the Deploy button on the template page to create a new Vercel project from the repository URL, or clone the repository and deploy manually using the Vercel CLI.
What streaming capabilities does it provide?
The /stream endpoint returns a streaming response, and the root page lets you interactively view the streamed data in an HTML interface, demonstrating real-time data delivery from a Rust backend.








