---
title: "Rust Hello World"
description: "Simple Rust serverless functions demonstrating basic HTTP handling and performance benchmarks."
url: "https://vercel.com/templates/other/rust-hello-world"
links:
  repository: "https://github.com/vercel/examples/tree/main/rust/hello-world"
  demo: "https://rust-hello-world.vercel.dev"
  deploy: "https://vercel.com/new/clone?demo-title=Rust+Hello+World&demo-description=Simple+Rust+serverless+functions+demonstrating+basic+HTTP+handling+and+performance+benchmarks.&demo-url=https%3A%2F%2Frust-hello-world.vercel.dev&project-name=rust-hello-world&repository-name=rust-hello-world&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Frust%2Fhello-world&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2FSxBy7ftbrOeyh4SU7prqm%2F8a843be6ef7da3e5685d93d539165ebd%2Frust-dark.png"
---

# Rust Hello World

Simple Rust serverless functions demonstrating basic HTTP handling and performance benchmarks.

# Rust Hello World

This example demonstrates how to create Rust serverless functions on Vercel with multiple endpoints showcasing different capabilities.

## Project Structure

- `api/hello` - Basic handler with json response
- `api/streaming` - Streaming response example
- `api/realistic-math-bench` - Mathematical benchmark
- `api/slower-bench` - Performance benchmark
- `Cargo.toml` - Rust dependencies and multiple binary configurations

## Development

Clone the repository:

```bash
git clone https://github.com/vercel/examples.git
cd examples/rust/hello-world
```

Install Rust if you haven't already:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Test locally (requires Rust toolchain):

```bash
vc dev
```

## Related Templates

### [Rust Axum](https://vercel.com/templates/other/rust-axum)

A Rust web application using the Axum framework with streaming capabilities on Vercel.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
