New Project

Rust Hello World

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

DeployView Demo

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:

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

Install Rust if you haven't already:

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

Test locally (requires Rust toolchain):

vc dev
GitHub Repovercel/examples
Use Cases
Starter
Stack
Other
None

Related Templates

Rust Axum

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