Description
Simple Rust serverless functions demonstrating basic HTTP handling and performance benchmarks.
npx boilerapp rust-hello-worldDocumentación
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 responseapi/streaming- Streaming response exampleapi/realistic-math-bench- Mathematical benchmarkapi/slower-bench- Performance benchmarkCargo.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
\
Prix
Gratuit